diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-06-26 02:29:12 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-06-26 02:30:23 +0900 |
commit | 457a4913be7de70f43a40cdec20e9cbfaacfda36 (patch) | |
tree | 372776d54ed80e4e4363e81b3c444af2b7cc748d | |
parent | c86f03be5527f9b199ffe1b0037996a43d478347 (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.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/ruby/internal/attr/deprecated.h b/include/ruby/internal/attr/deprecated.h index 38a7deeaaa..8bc1db5185 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) */ |