From 97b53d1a4ad77bbe0402ad1e77901346cc489624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 7 Jan 2023 18:19:47 +0100 Subject: Remove "unused parameter" warnings on include of ruby.h These warnings are displayed when compiling with flag "-Wunused-parameter" (or with "-Wall -Wextra"). --- include/ruby/internal/fl_type.h | 9 +++++++++ include/ruby/internal/newobj.h | 4 ++++ 2 files changed, 13 insertions(+) (limited to 'include') diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h index 7383426b23..555f23a5a5 100644 --- a/include/ruby/internal/fl_type.h +++ b/include/ruby/internal/fl_type.h @@ -787,6 +787,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) static inline bool RB_OBJ_TAINTABLE(VALUE obj) { + (void)obj; return false; } @@ -804,6 +805,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) static inline VALUE RB_OBJ_TAINTED_RAW(VALUE obj) { + (void)obj; return false; } @@ -821,6 +823,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) static inline bool RB_OBJ_TAINTED(VALUE obj) { + (void)obj; return false; } @@ -836,6 +839,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) static inline void RB_OBJ_TAINT_RAW(VALUE obj) { + (void)obj; return; } @@ -851,6 +855,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) static inline void RB_OBJ_TAINT(VALUE obj) { + (void)obj; return; } @@ -867,6 +872,8 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) static inline void RB_OBJ_INFECT_RAW(VALUE dst, VALUE src) { + (void)dst; + (void)src; return; } @@ -883,6 +890,8 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) static inline void RB_OBJ_INFECT(VALUE dst, VALUE src) { + (void)dst; + (void)src; return; } diff --git a/include/ruby/internal/newobj.h b/include/ruby/internal/newobj.h index a8a5557a25..ba1d7cbe59 100644 --- a/include/ruby/internal/newobj.h +++ b/include/ruby/internal/newobj.h @@ -172,6 +172,8 @@ RBIMPL_ATTR_DEPRECATED(("This is no longer how Object#clone works.")) static inline void rb_clone_setup(VALUE clone, VALUE obj) { + (void)clone; + (void)obj; return; } @@ -189,6 +191,8 @@ RBIMPL_ATTR_DEPRECATED(("This is no longer how Object#dup works.")) static inline void rb_dup_setup(VALUE dup, VALUE obj) { + (void)dup; + (void)obj; return; } -- cgit v1.2.1