[Bug 6068] Enhancement: Add warning -Wcast-align for GCC

bugzilla at busybox.net bugzilla at busybox.net
Tue Mar 5 21:42:44 UTC 2013


https://bugs.busybox.net/show_bug.cgi?id=6068

--- Comment #2 from Jeffrey Walton <noloader at gmail.com> 2013-03-05 21:43:26 UTC ---
clang -c libc/sysdeps/linux/common/cmsg_nxthdr.c -o
libc/sysdeps/linux/common/cmsg_nxthdr.os -include ./include/libc-symbols.h
-Wall -Wstrict-prototypes -Wstrict-aliasing -Wformat=2 -Wmissing-noreturn
-Wmissing-format-attribute -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -Wnonnull -Wold-style-definition -Wshadow -Wundef
-Wdeclaration-after-statement -funsigned-char -fno-builtin -fno-asm -std=gnu99
-fno-stack-protector -nostdinc -I./include -I./include -I.
-I./libc/sysdeps/linux -I./libc/sysdeps/linux/x86_64  -Os -funit-at-a-time
-fmerge-all-constants -fstrict-aliasing -Wcast-align -fno-common
-I./libc/sysdeps/linux/common -I/usr/src/linux-headers-3.2.0-38/include/
-isystem /usr/local/bin/../lib/clang/3.1/include-fixed -isystem
/usr/local/bin/../lib/clang/3.1/include -DNDEBUG -fPIC     -MT
libc/sysdeps/linux/common/cmsg_nxthdr.os -MD -MP -MF
libc/sysdeps/linux/common/.cmsg_nxthdr.os.dep



libc/sysdeps/linux/common/cmsg_nxthdr.c:34:10: warning: cast from
      'unsigned char *' to 'struct cmsghdr *' increases required alignment from
      1 to 8 [-Wcast-align]
  cmsg = (struct cmsghdr *) ((unsigned char *) cmsg
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the uClibc-cvs mailing list