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

ruby-changes:48153

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

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

  New Revision: 60267

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

  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_folded_scalar?\226?\128?\153:
    ../../../ext/psych/yaml/emitter.c:2283:5: warning: passing argument 2 of ?\226?\128?\152yaml_emitter_write_indicator?\226?\128?\153 discards ?\226?\128?\152const?\226?\128?\153 qualifier from pointer target type [enabled by default]
         if (!yaml_emitter_write_indicator(emitter, ">", 1, 0, 0))
         ^

  Modified files:
    trunk/ext/psych/yaml/emitter.c
Index: ext/psych/yaml/emitter.c
===================================================================
--- ext/psych/yaml/emitter.c	(revision 60266)
+++ ext/psych/yaml/emitter.c	(revision 60267)
@@ -221,7 +221,7 @@ yaml_emitter_write_indent(yaml_emitter_t https://github.com/ruby/ruby/blob/trunk/ext/psych/yaml/emitter.c#L221
 
 static int
 yaml_emitter_write_indicator(yaml_emitter_t *emitter,
-        char *indicator, int need_whitespace,
+        const char *indicator, int need_whitespace,
         int is_whitespace, int is_indention);
 
 static int
@@ -1784,7 +1784,7 @@ yaml_emitter_write_indent(yaml_emitter_t https://github.com/ruby/ruby/blob/trunk/ext/psych/yaml/emitter.c#L1784
 
 static int
 yaml_emitter_write_indicator(yaml_emitter_t *emitter,
-        char *indicator, int need_whitespace,
+        const char *indicator, int need_whitespace,
         int is_whitespace, int is_indention)
 {
     size_t indicator_length;

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

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