From 457a4913be7de70f43a40cdec20e9cbfaacfda36 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Sat, 26 Jun 2021 02:29:12 +0900 Subject: [PATCH] Disable RBIMPL_ATTR_DEPRECATED for Coverity Scan build Coverity Scan emulates gcc but seems not to support this attribute correctly. --- include/ruby/internal/attr/deprecated.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) */