Project

General

Profile

Actions

Bug #9287

closed

'rb_obj_write' discards qualifiers from pointer target type

Added by naruse (Yui NARUSE) almost 11 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-12-23 trunk 44360) [i386-freebsd9.2]
Backport:
[ruby-dev:47858]

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

Updated by ko1 (Koichi Sasada) almost 11 years ago

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


#include <stdio.h>

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

Actions #2

Updated by ko1 (Koichi Sasada) almost 11 years 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]

Updated by ko1 (Koichi Sasada) almost 11 years ago

  • Status changed from Closed to Assigned
  • % Done changed from 100 to 0
Actions #4

Updated by ko1 (Koichi Sasada) over 9 years ago

  • Status changed from Assigned to Feedback

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

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

Actions #5

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Feedback to Closed
  • Backport deleted (1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN)
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0