On Thu, May 2, 2013 at 3:31 AM, Michael Seyfert <michael@xxxxxxxxxxxx> wrote: > When compiling libsepol with optimizations enabled I get this warning: > > gcc -o hierarchy.o -c -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -D_GNU_SOURCE -O3 -I. -I/mnt/data/work/selinux/selinux/libsepol/include hierarchy.c > hierarchy.c: In function 'check_avtab_hierarchy_callback': > hierarchy.c:234:2: error: 'av.data' may be used uninitialized in this function [-Werror=maybe-uninitialized] > cc1: all warnings being treated as errors > scons: *** [hierarchy.o] Error 1 > scons: building terminated because of errors. > > I'm not familiar enough with the internals of selinux to know if this is a problem or not. Could someone look at it? > Clever compiler isn't so clever. AFAICT the only way av.data would be uninitialized is if no parent types were found, which would cause the return 0 just above that ERR() line. I guess it could be initialized up top, even though that seems completely unnecessary. -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with the words "unsubscribe selinux" without quotes as the message.