From: Ulrich Drepper Date: Thu, 10 May 2007 20:15:11 +0000 (+0000) Subject: Redefine __nonnull so that test for incorrect parameters in the libc code itself... X-Git-Tag: cvs/fedora-glibc-20070510T2304~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00afb11fc0a9282d7e2cbc51cd1c65bf1b79a5ae;p=thirdparty%2Fglibc.git Redefine __nonnull so that test for incorrect parameters in the libc code itself are not omitted. --- diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 8ba980477d3..cd0750b4524 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -2,6 +2,12 @@ #include +/* The compiler will optimize based on the knowledge the parameter is + not NULL. This will omit tests. A robust implementation cannot allow + this so when compiling glibc itself we ignore this attribute. */ +#undef __nonnull +#define __nonnull(params) + extern void __chk_fail (void) __attribute__ ((__noreturn__)); libc_hidden_proto (__chk_fail) rtld_hidden_proto (__chk_fail)