[前][次][番号順一覧][スレッド一覧]

ruby-changes:48154

From: kosaki <ko1@a...>
Date: Sat, 21 Oct 2017 22:15:26 +0900 (JST)
Subject: [ruby-changes:48154] kosaki:r60268 (trunk): kill "discards ?\226?\128?\152const?\226?\128?\153 qualifier" warning

kosaki	2017-10-21 22:15:23 +0900 (Sat, 21 Oct 2017)

  New Revision: 60268

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60268

  Log:
    kill "discards ?\226?\128?\152const?\226?\128?\153 qualifier" warning
    
    Kill following warning.
    
    ../../../ext/psych/yaml/emitter.c: In function ?\226?\128?\152yaml_emitter_write_block_scalar_hints?\226?\128?\153:
    ../../../ext/psych/yaml/emitter.c:2196:20: warning: assignment discards ?\226?\128?\152const?\226?\128?\153 qualifier from pointer target type [enabled by default]
             chomp_hint = "-";
                        ^

  Modified files:
    trunk/ext/psych/yaml/emitter.c
Index: ext/psych/yaml/emitter.c
===================================================================
--- ext/psych/yaml/emitter.c	(revision 60267)
+++ ext/psych/yaml/emitter.c	(revision 60268)
@@ -2178,7 +2178,7 @@ yaml_emitter_write_block_scalar_hints(ya https://github.com/ruby/ruby/blob/trunk/ext/psych/yaml/emitter.c#L2178
         yaml_string_t string)
 {
     char indent_hint[2];
-    char *chomp_hint = NULL;
+    const char *chomp_hint = NULL;
 
     if (IS_SPACE(string) || IS_BREAK(string))
     {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]