Bug 214183 - [libcap-2.54] clang alignment warning
Summary: [libcap-2.54] clang alignment warning
Status: RESOLVED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: libcap (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew G. Morgan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-26 05:09 UTC by Andrew G. Morgan
Modified: 2021-08-27 05:29 UTC (History)
0 users

See Also:
Kernel Version: n/a
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Andrew G. Morgan 2021-08-26 05:09:43 UTC
clang -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Dlinux -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -g  -fPIC -I/home/andrew/gits/libcap/libcap/../libcap/include/uapi -I/home/andrew/gits/libcap/libcap/../libcap/include -c cap_alloc.c -o cap_alloc.o
cap_alloc.c:150:33: warning: cast from 'uint32_t *' (aka 'unsigned int *') to 'struct cap_launch_s *' increases required alignment from 4 to 8 [-Wcast-align]
    struct cap_launch_s *attr = (struct cap_launch_s *) data;
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cap_alloc.c:172:33: warning: cast from 'uint32_t *' (aka 'unsigned int *') to 'struct cap_launch_s *' increases required alignment from 4 to 8 [-Wcast-align]
    struct cap_launch_s *attr = (struct cap_launch_s *) data;
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Note You need to log in before you can comment on or make changes to this bug.