]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Disable gcc's __warn_unused_result__ attribute in glibc headers when _GOOGLE_FORTIFY_...
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Sat, 1 Mar 2014 01:22:06 +0000 (17:22 -0800)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Sat, 1 Mar 2014 01:22:06 +0000 (17:22 -0800)
README.google
misc/sys/cdefs.h

index c13b1ab510e163e02eb101c027c796a3940afdd1..b1a2c0c70071a3233b04641b32f033c841586591 100644 (file)
@@ -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)
+
index 4d958ea066b3ae4b626bc0b106941487fd5a2d59..c867be7cfe74e53e8a93a377526ff837c50761d8 100644 (file)
 # 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__))