Skip to content

Commit

Permalink
Remove "unused parameter" warnings on include of ruby.h
Browse files Browse the repository at this point in the history
These warnings are displayed when compiling with flag "-Wunused-parameter" (or
with "-Wall -Wextra").
  • Loading branch information
flashcode authored and shyouhei committed Feb 28, 2023
1 parent ba55706 commit 97b53d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/ruby/internal/fl_type.h
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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;
}

Expand Down
4 changes: 4 additions & 0 deletions include/ruby/internal/newobj.h
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit 97b53d1

Please sign in to comment.