Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-12-21 19:23:49 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-12-21 19:23:49 +0300
commitc93fd8438c86f7df1b938a37b6034764caff0638 (patch)
treede4e6991bf86e9c1807779441d8e79d3a377e025 /source/blender/blenlib/BLI_compiler_attrs.h
parent4eeab96f105f12cfbecc305c3f46475b6724470c (diff)
Cleanup: fix more ATTR_FALLTHROUGH warnings.
Ref D3960.
Diffstat (limited to 'source/blender/blenlib/BLI_compiler_attrs.h')
-rw-r--r--source/blender/blenlib/BLI_compiler_attrs.h10
1 files changed, 6 insertions, 4 deletions
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. */