Project

General

Profile

Actions

Bug #8674

closed

[patch] unused-parameter warning in ruby/ruby.h

Added by Linda_pp (Ryuichi Hayashida) over 11 years ago. Updated almost 11 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
[ruby-dev:47534]

Description

C++ のプログラムで ruby.h をインクルードすると ruby/ruby.h にて unused-parameter の警告が出ます.

・警告内容
In file included from /Users/rhayasd/.rbenv/versions/2.1.0-dev/include/ruby-2.1.0/ruby.h:33:0,
from ruby_interpreter.cpp:6:
/Users/rhayasd/.rbenv/versions/2.1.0-dev/include/ruby-2.1.0/ruby/ruby.h:1270:1: warning: unused parameter 'filename' [-Wunused-parameter]
rb_obj_wb_unprotect(VALUE x, const char *filename, int line)
^
/Users/rhayasd/.rbenv/versions/2.1.0-dev/include/ruby-2.1.0/ruby/ruby.h:1270:1: warning: unused parameter 'line' [-Wunused-parameter]
/Users/rhayasd/.rbenv/versions/2.1.0-dev/include/ruby-2.1.0/ruby/ruby.h:1290:1: warning: unused parameter 'oldv' [-Wunused-parameter]
rb_obj_written(VALUE a, VALUE oldv, VALUE b, const char *filename, int line)
^
/Users/rhayasd/.rbenv/versions/2.1.0-dev/include/ruby-2.1.0/ruby/ruby.h:1290:1: warning: unused parameter 'filename' [-Wunused-parameter]
/Users/rhayasd/.rbenv/versions/2.1.0-dev/include/ruby-2.1.0/ruby/ruby.h:1290:1: warning: unused parameter 'line' [-Wunused-parameter]

・コンパイラ
 gcc 4.8.1

・コマンド
 g++ -Wall -Wextra -std=c++11 source.cpp

・環境
 MacOS X 10.8.4


Files

fix-warning-for-unused-parameter.patch (575 Bytes) fix-warning-for-unused-parameter.patch 警告を抑制しました Linda_pp (Ryuichi Hayashida), 07/24/2013 12:13 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0