[Bf-blender-cvs] [9f45f1a6b73] master: GFlags: Fix usage of unused attribute

Sergey Sharybin noreply at git.blender.org
Thu Mar 22 17:23:11 CET 2018


Commit: 9f45f1a6b73218286d8b7bc9e1976bb3c4acb31e
Author: Sergey Sharybin
Date:   Thu Mar 22 17:19:56 2018 +0100
Branches: master
https://developer.blender.org/rB9f45f1a6b73218286d8b7bc9e1976bb3c4acb31e

GFlags: Fix usage of unused attribute

===================================================================

M	extern/gflags/README.blender
M	extern/gflags/src/gflags/gflags.h

===================================================================

diff --git a/extern/gflags/README.blender b/extern/gflags/README.blender
index 1f6f0111776..68dba114329 100644
--- a/extern/gflags/README.blender
+++ b/extern/gflags/README.blender
@@ -21,3 +21,6 @@ Local modifications:
   not trigger strict compiler warning.
 
 - Did the same for CommandLineFlagParser::ValidateFlags().
+
+- Ifdef-ed __attribute((unused)) in gflags.h.
+  This file is compile-time configurable in upstream, so can not avoid change here.
diff --git a/extern/gflags/src/gflags/gflags.h b/extern/gflags/src/gflags/gflags.h
index 02b40e158dc..d5401f4f575 100644
--- a/extern/gflags/src/gflags/gflags.h
+++ b/extern/gflags/src/gflags/gflags.h
@@ -285,7 +285,11 @@ class GFLAGS_DLL_DECL FlagSaver {
 
   FlagSaver(const FlagSaver&);  // no copying!
   void operator=(const FlagSaver&);
-}__attribute((unused));
+}
+#ifdef __GNUC__
+__attribute((unused))
+#endif
+;
 
 // --------------------------------------------------------------------
 // Some deprecated or hopefully-soon-to-be-deprecated functions.



More information about the Bf-blender-cvs mailing list