Skip to content

Commit 97b53d1

Browse files
flashcodeshyouhei
authored andcommitted
Remove "unused parameter" warnings on include of ruby.h
These warnings are displayed when compiling with flag "-Wunused-parameter" (or with "-Wall -Wextra").
1 parent ba55706 commit 97b53d1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

include/ruby/internal/fl_type.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
787787
static inline bool
788788
RB_OBJ_TAINTABLE(VALUE obj)
789789
{
790+
(void)obj;
790791
return false;
791792
}
792793

@@ -804,6 +805,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
804805
static inline VALUE
805806
RB_OBJ_TAINTED_RAW(VALUE obj)
806807
{
808+
(void)obj;
807809
return false;
808810
}
809811

@@ -821,6 +823,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
821823
static inline bool
822824
RB_OBJ_TAINTED(VALUE obj)
823825
{
826+
(void)obj;
824827
return false;
825828
}
826829

@@ -836,6 +839,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
836839
static inline void
837840
RB_OBJ_TAINT_RAW(VALUE obj)
838841
{
842+
(void)obj;
839843
return;
840844
}
841845

@@ -851,6 +855,7 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
851855
static inline void
852856
RB_OBJ_TAINT(VALUE obj)
853857
{
858+
(void)obj;
854859
return;
855860
}
856861

@@ -867,6 +872,8 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
867872
static inline void
868873
RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
869874
{
875+
(void)dst;
876+
(void)src;
870877
return;
871878
}
872879

@@ -883,6 +890,8 @@ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
883890
static inline void
884891
RB_OBJ_INFECT(VALUE dst, VALUE src)
885892
{
893+
(void)dst;
894+
(void)src;
886895
return;
887896
}
888897

include/ruby/internal/newobj.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ RBIMPL_ATTR_DEPRECATED(("This is no longer how Object#clone works."))
172172
static inline void
173173
rb_clone_setup(VALUE clone, VALUE obj)
174174
{
175+
(void)clone;
176+
(void)obj;
175177
return;
176178
}
177179

@@ -189,6 +191,8 @@ RBIMPL_ATTR_DEPRECATED(("This is no longer how Object#dup works."))
189191
static inline void
190192
rb_dup_setup(VALUE dup, VALUE obj)
191193
{
194+
(void)dup;
195+
(void)obj;
192196
return;
193197
}
194198

0 commit comments

Comments
 (0)