Fix alignment errors
This fixes -Wcast-align errors when compiled with WARNS=6.
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google LLC (Google Summer of Code 2019)
Differential D21327
ping: fix alignment errors jansucan on Aug 19 2019, 6:45 PM. Authored by Tags None Referenced Files
Subscribers
Details
Fix alignment errors This fixes -Wcast-align errors when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com>
Diff Detail
Event TimelineComment Actions This change breaks the build on powerpc, powerpc64, and sparc64: /home/asomers/freebsd/base/head/sbin/ping/ping.c: In function 'pr_pack': /home/asomers/freebsd/base/head/sbin/ping/ping.c:1144: warning: signed and unsigned type in conditional expression Comment Actions If the line 1144 is this line if (icp.icmp_type == icmp_type_rsp) { then it's interesting because both of the variables are u_char. Could you please provide me more info from the compiler? Comment Actions That's the whole of the compiler's error output. If you want to reproduce it locally, you should be able to do it with env ARCH=powerpc TARGET_ARCH=powerpc make buildworld. I recommend adding -DNO_CLEAN if you do it more than once. And don't forget the appropriate -j X, or you'll be waiting all day.
|