View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005050 | UBoot | U-Boot | public | 2021-10-28 12:57 | 2021-10-28 14:21 |
Reporter | derksen | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | fsimx8mn-Y2021.09 | ||||
Target Version | fsimx6-B2021.10 | Fixed in Version | fsimx6-B2021.10 | ||
Summary | 0005050: net: unaligned copying of unsigned long | ||||
Description | net: unaligned copying of unsigned long The inline functions net_read_u32() and net_copy_u32() have been created to copy unaligned u32. But this is not obvious to the compiler. GCC 9.1 introduces a check -Werror=address-of-packed-member which leads to a build error on Travis CI: | ||||
Additional Information | External patch: Reported-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> net/bootp.c: In function ‘dhcp_send_request_packet’: net/bootp.c:1011:27: error: taking address of packed member of ‘struct bootp_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 1011 | net_copy_u32(&bp->bp_id, &bp_offer->bp_id); Change the type of the function parameters to void * to avoid the build error. | ||||
Forum Link | |||||