From ed0487bc24fac15446bbf533f0325aa7e4b808fa Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 8 Dec 2007 08:11:52 +0000 Subject: * ruby.c (proc_options): make rb_raise format as a string literal to avoid warning. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index 72602db01..486780467 100644 --- a/ruby.c +++ b/ruby.c @@ -856,16 +856,16 @@ proc_options(int argc, char **argv, struct cmdline_options *opt) default: { - const char *format; if (ISPRINT(*s)) { - format = - "invalid option -%c (-h will show valid options)"; + rb_raise(rb_eRuntimeError, + "invalid option -%c (-h will show valid options)", + (int)(unsigned char)*s); } else { - format = - "invalid option -\\%03o (-h will show valid options)"; + rb_raise(rb_eRuntimeError, + "invalid option -\\%03o (-h will show valid options)", + (int)(unsigned char)*s); } - rb_raise(rb_eRuntimeError, format, (int)(unsigned char)*s); } goto switch_end; -- cgit