There are several places in the headers when _FORTIFY_SOURCE and __USE_FORTIFY_LEVEL are used even though they are undefined. GNU cpp doesn't report warnings in system includes, but sparse does: /usr/include/features.h:265:5: warning: undefined preprocessor identifier '_FORTIFY_SOURCE' /usr/include/sys/cdefs.h:264:6: warning: undefined preprocessor identifier '__USE_FORTIFY_LEVEL' /usr/include/stdio.h:833:5: warning: undefined preprocessor identifier '__USE_FORTIFY_LEVEL' /usr/include/string.h:420:6: warning: undefined preprocessor identifier '__USE_FORTIFY_LEVEL' /usr/include/unistd.h:1051:5: warning: undefined preprocessor identifier '__USE_FORTIFY_LEVEL'
Created attachment 692 [details] Patch against CVS glibc This patch is sufficient to make current sparse stop complaining.
Subject: Bug 1438 CVSROOT: /cvs/glibc Module name: libc Changes by: roland@sources.redhat.com 2005-10-08 06:27:44 Modified files: include : features.h Log message: 2005-10-07 Roland McGrath <roland@redhat.com> [BZ #1438] * include/features.h: Make tests on _FORTIFY_SOURCE and __OPTIMIZE__ friendly to -Wundef. (__USE_FORTIFY_LEVEL): Always define it, to 0 if nothing else. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/include/features.h.diff?cvsroot=glibc&r1=1.38&r2=1.39
Change checked in.