summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-06-26 02:29:12 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-06-26 02:30:23 +0900
commit457a4913be7de70f43a40cdec20e9cbfaacfda36 (patch)
tree372776d54ed80e4e4363e81b3c444af2b7cc748d
parentc86f03be5527f9b199ffe1b0037996a43d478347 (diff)
Disable RBIMPL_ATTR_DEPRECATED for Coverity Scan build
Coverity Scan emulates gcc but seems not to support this attribute correctly.
-rw-r--r--include/ruby/internal/attr/deprecated.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/ruby/internal/attr/deprecated.h b/include/ruby/internal/attr/deprecated.h
index 38a7deeaaa5..8bc1db51856 100644
--- a/include/ruby/internal/attr/deprecated.h
+++ b/include/ruby/internal/attr/deprecated.h
@@ -28,7 +28,11 @@
#include "ruby/internal/has/extension.h"
/** Wraps (or simulates) `[[deprecated]]` */
-#if RBIMPL_HAS_EXTENSION(attribute_deprecated_with_message)
+#if defined(__COVERITY__)
+/* Coverity Scan emulates gcc but seems not to support this attribute correctly */
+# define RBIMPL_ATTR_DEPRECATED(msg)
+
+#elif RBIMPL_HAS_EXTENSION(attribute_deprecated_with_message)
# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
#elif defined(__cplusplus) && RBIMPL_COMPILER_SINCE(GCC, 10, 1, 0) /* && RBIMPL_COMPILER_BEFORE(GCC, 10, X, Y) */