]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to a common header file not applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Wed, 30 Jun 2021 18:37:27 +0000 (11:37 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Wed, 30 Jun 2021 18:37:27 +0000 (11:37 -0700)
open-vm-tools/lib/include/vm_basic_defs.h

index 5a2e658be515f90cb4a3a9c36ceba481e7188e5d..71a581d195e796f7e301d91e9ce30e5590ffc71a 100644 (file)
@@ -892,4 +892,17 @@ typedef int pid_t;
 #define VMW_CLANG_ANALYZER_NORETURN() ((void)0)
 #endif
 
+/* VMW_FALLTHROUGH
+ *
+ *   Instructs GCC 9 and above to not warn when a case label of a
+ *   'switch' statement falls through to the next label.
+ *
+ *   If not GCC 9 or above, expands to nothing.
+ */
+#if __GNUC__ >= 9
+#define VMW_FALLTHROUGH __attribute__((fallthrough))
+#else
+#define VMW_FALLTHROUGH
+#endif
+
 #endif // ifndef _VM_BASIC_DEFS_H_