From 09419874c8018830a53db1f5bec3ecadcb26c815 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Sat, 18 Apr 2015 21:43:58 +0900 Subject: Suppress warnings generated by -Wwrite-strings Here are suppressed warnings: src/fmt_fp.c: In function 'fmt_fp': src/fmt_fp.c:124:16: warning: initialization discards 'const' qualifier from pointer target type char *ss = (t&32)?"inf":"INF"; ^ src/fmt_fp.c:125:17: warning: assignment discards 'const' qualifier from pointer target type if (y!=y) ss=(t&32)?"nan":"NAN"; ^ mrbgems/mruby-string-ext/src/string.c: In function 'mrb_str_succ_bang': mrbgems/mruby-string-ext/src/string.c:302:27: warning: assignment discards 'const' qualifier from pointer target type if (e == b) prepend = "1"; ^ mrbgems/mruby-string-ext/src/string.c:305:27: warning: assignment discards 'const' qualifier from pointer target type if (e == b) prepend = "a"; ^ mrbgems/mruby-string-ext/src/string.c:308:27: warning: assignment discards 'const' qualifier from pointer target type if (e == b) prepend = "A"; ^ mrbgems/mruby-bin-mruby/tools/mruby/mruby.c: In function 'main': mrbgems/mruby-bin-mruby/tools/mruby/mruby.c:213:13: warning: assignment discards 'const' qualifier from pointer target type cmdline = args.cmdline ? args.cmdline : "-"; ^ mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c: In function 'print_breakpoint': mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:159:3: warning: initialization discards 'const' qualifier from pointer target type char* enable_letter[] = {BREAK_INFO_MSG_DISABLE, BREAK_INFO_MSG_ENABLE}; ^ mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:159:3: warning: initialization discards 'const' qualifier from pointer target type --- mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mrbgems/mruby-bin-debugger/tools') diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c b/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c index d4ec3d5f8..b913915c3 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c @@ -156,7 +156,7 @@ check_bptype(char* args) static void print_breakpoint(mrb_debug_breakpoint *bp) { - char* enable_letter[] = {BREAK_INFO_MSG_DISABLE, BREAK_INFO_MSG_ENABLE}; + const char* enable_letter[] = {BREAK_INFO_MSG_DISABLE, BREAK_INFO_MSG_ENABLE}; if(bp->type == MRB_DEBUG_BPTYPE_LINE) { printf(BREAK_INFO_MSG_LINEBREAK, -- cgit v1.2.3