[Bf-blender-cvs] [c93fd8438c8] blender2.7: Cleanup: fix more ATTR_FALLTHROUGH warnings.
Brecht Van Lommel
noreply at git.blender.org
Fri Dec 21 17:25:17 CET 2018
Commit: c93fd8438c86f7df1b938a37b6034764caff0638
Author: Brecht Van Lommel
Date: Fri Dec 21 17:23:49 2018 +0100
Branches: blender2.7
https://developer.blender.org/rBc93fd8438c86f7df1b938a37b6034764caff0638
Cleanup: fix more ATTR_FALLTHROUGH warnings.
Ref D3960.
===================================================================
M source/blender/blenlib/BLI_compiler_attrs.h
===================================================================
diff --git a/source/blender/blenlib/BLI_compiler_attrs.h b/source/blender/blenlib/BLI_compiler_attrs.h
index 2b6baa0d67b..09c0426db92 100644
--- a/source/blender/blenlib/BLI_compiler_attrs.h
+++ b/source/blender/blenlib/BLI_compiler_attrs.h
@@ -93,10 +93,12 @@
#endif
/* Use to suppress '-Wimplicit-fallthrough' (in place of 'break'). */
-#if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */
-# define ATTR_FALLTHROUGH __attribute__((fallthrough))
-#else
-# define ATTR_FALLTHROUGH ((void)0)
+#ifndef ATTR_FALLTHROUGH
+# if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */
+# define ATTR_FALLTHROUGH __attribute__((fallthrough))
+# else
+# define ATTR_FALLTHROUGH ((void)0)
+# endif
#endif
/* Declare the memory alignment in Bytes. */
More information about the Bf-blender-cvs
mailing list