Bug #9287

'rb_obj_write' discards qualifiers from pointer target type

Added by Yui NARUSE over 1 year ago. Updated 6 days ago.

[ruby-dev:47858]
Status:Feedback
Priority:Normal
Assignee:Koichi Sasada
ruby -v:ruby 2.1.0dev (2013-12-23 trunk 44360) [i386-freebsd9.2] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN

Description

array.c: In function 'rb_ary_new_from_args':
array.c:506: warning: passing argument 2 of 'rb_obj_write' discards qualifiers from pointer target type
などといった警告が出ます。

http://fb32.rubyci.org/~chkbuild/ruby-trunk/log/20131223T070301Z.log.html.gz

Associated revisions

Revision 44372
Added by Koichi Sasada over 1 year ago

  • include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning. [Bug #9287]

Revision 44372
Added by Koichi Sasada over 1 year ago

  • include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning. [Bug #9287]

History

#1 Updated by Koichi Sasada over 1 year ago

下記のようなプログラムで警告が出るか確認してもらうことは出来るでしょうか。


#include

int
main() {
const int foo = 0;
int *ptr = (int *)&foo;
*ptr = 1;
printf("foo: %d\n", foo);
return 0;
}

#2 Updated by Koichi Sasada over 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r44372.
Yui, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning. [Bug #9287]

#3 Updated by Koichi Sasada over 1 year ago

  • Status changed from Closed to Assigned
  • % Done changed from 100 to 0

#4 Updated by Koichi Sasada 6 days ago

  • Status changed from Assigned to Feedback

gcc のバージョンが変わったからか、
でなくなったんでしょうか。

http://fb32.rubyci.org/~chkbuild/ruby-trunk/log/20150821T230303Z.log.html.gz

Also available in: Atom PDF