Skip to content
  • Shugo Maeda's avatar
    d8bcfd2b
    Add volatile to a suppress warning. · d8bcfd2b
    Shugo Maeda authored
    Without the fix, the following warning is shown:
    
        compiling cont.c
        cont.c: In function ‘rb_callcc’:
        cont.c:949:39: warning: passing argument 1 of ‘cont_capture’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    	 volatile VALUE val = cont_capture(&called);
    					   ^
        cont.c:473:1: note: expected ‘int * volatile’ but argument is of type ‘volatile int *’
         cont_capture(int *volatile stat)
         ^
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    d8bcfd2b
    Add volatile to a suppress warning.
    Shugo Maeda authored
    Without the fix, the following warning is shown:
    
        compiling cont.c
        cont.c: In function ‘rb_callcc’:
        cont.c:949:39: warning: passing argument 1 of ‘cont_capture’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    	 volatile VALUE val = cont_capture(&called);
    					   ^
        cont.c:473:1: note: expected ‘int * volatile’ but argument is of type ‘volatile int *’
         cont_capture(int *volatile stat)
         ^
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Loading