diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2014-02-28 17:22:06 -0800 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2014-02-28 17:22:06 -0800 |
commit | 63473c36767faa85fe43ad34c3b600adcfdb5e99 (patch) | |
tree | 03b7d697c5e41ee0df5d33fef576a565bc772f80 | |
parent | 283b5c7b391ab61544cf2f8883fdff152202a740 (diff) | |
download | glibc-63473c36767faa85fe43ad34c3b600adcfdb5e99.tar.gz glibc-63473c36767faa85fe43ad34c3b600adcfdb5e99.tar.xz glibc-63473c36767faa85fe43ad34c3b600adcfdb5e99.zip |
Disable gcc's __warn_unused_result__ attribute in glibc headers when _GOOGLE_FORTIFY_SOURCE_NO_WARN_UNUSED_RESULT is specified.
-rw-r--r-- | README.google | 9 | ||||
-rw-r--r-- | misc/sys/cdefs.h | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/README.google b/README.google index c13b1ab510..b1a2c0c700 100644 --- a/README.google +++ b/README.google @@ -138,3 +138,12 @@ elf/rtld.c Forward-ported from cl/51332859 (from cl/51576-p2 and cl/51620-p2). (ppluzhnikov, google-local) +misc/sys/cdefs.h + g/grte-team/browse_thread/thread/d08601e9f5542d94 + Disable gcc's __warn_unused_result__ attribute in glibc headers when + _GOOGLE_FORTIFY_SOURCE_NO_WARN_UNUSED_RESULT is specified, even if + _FORTIFY_SOURCE is set. Some google3 code does not compile when this + attribute is set on some glibc functions. + Forward-ported from cl/51334004 (from cl/53404-p2). + (swiecki, google-local) + diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 4d958ea066..c867be7cfe 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -303,6 +303,13 @@ # define __wur /* Ignore */ #endif +/* Google specific: Disable __warn_unused_result__ attribute even if + _FORTIFY_SOURCE is specified. Not all google3 code compiles when it's set */ +#ifdef _GOOGLE_FORTIFY_SOURCE_NO_WARN_UNUSED_RESULT +# undef __wur +# define __wur /* Ignore */ +#endif + /* Forces a function to be always inlined. */ #if __GNUC_PREREQ (3,2) # define __always_inline __inline __attribute__ ((__always_inline__)) |