Merge pull request #2768 from kou/suppress-write-strings-warnings

Suppress warnings generated by -Wwrite-strings
This commit is contained in:
Yukihiro "Matz" Matsumoto
2015-04-19 08:21:51 +09:00
5 changed files with 5 additions and 5 deletions
@@ -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,
+1 -1
View File
@@ -209,7 +209,7 @@ main(int argc, char **argv)
/* Set $0 */
zero_sym = mrb_intern_lit(mrb, "$0");
if (args.rfp) {
char *cmdline;
const char *cmdline;
cmdline = args.cmdline ? args.cmdline : "-";
mrbc_filename(mrb, c, cmdline);
mrb_gv_set(mrb, zero_sym, mrb_str_new_cstr(mrb, cmdline));
+1 -1
View File
@@ -253,7 +253,7 @@ mrb_str_succ_bang(mrb_state *mrb, mrb_value self)
{
mrb_value result;
unsigned char *p, *e, *b, *t;
char *prepend;
const char *prepend;
struct RString *s = mrb_str_ptr(self);
size_t l;
+1 -1
View File
@@ -121,7 +121,7 @@ fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t)
} else prefix++, pl=0;
if (!isfinite(y)) {
char *ss = (t&32)?"inf":"INF";
const char *ss = (t&32)?"inf":"INF";
if (y!=y) ss=(t&32)?"nan":"NAN";
pad(f, ' ', w, 3+pl, fl&~ZERO_PAD);
out(f, prefix, pl);
+1 -1
View File
@@ -1,7 +1,7 @@
MRuby::Toolchain.new(:gcc) do |conf|
[conf.cc, conf.objc, conf.asm].each do |cc|
cc.command = ENV['CC'] || 'gcc'
cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement)]
cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings)]
cc.defines = %w(DISABLE_GEMS)
cc.option_include_path = '-I%s'
cc.option_define = '-D%s'