ruby-changes:66605
From: Yusuke <ko1@a...>
Date: Sat, 26 Jun 2021 02:30:44 +0900 (JST)
Subject: [ruby-changes:66605] 457a4913be (master): Disable RBIMPL_ATTR_DEPRECATED for Coverity Scan build
https://git.ruby-lang.org/ruby.git/commit/?id=457a4913be From 457a4913be7de70f43a40cdec20e9cbfaacfda36 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sat, 26 Jun 2021 02:29:12 +0900 Subject: 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 38a7dee..8bc1db5 100644 --- a/include/ruby/internal/attr/deprecated.h +++ b/include/ruby/internal/attr/deprecated.h @@ -28,7 +28,11 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/attr/deprecated.h#L28 #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) */ -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/