[Bug #846] thread.c:2981: warning: format not a string literal and no format arguments

Bug #846: thread.c:2981: warning: format not a string literal and no
format arguments
http://redmine.ruby-lang.org/issues/show/846

e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Low

http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/last
gcc -DRUBY_DEBUG_ENV -O2 -g -Wall -Wformat=2 -Wundef -Wno-parentheses
-I. -I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT -o
thread.o -c thread.c
thread.c: In function ‘rb_mutex_unlock’:
thread.c:2981: warning: format not a string literal and no format
arguments

e$B$H$$$&7Y9p$,=P$F$$$^$9!#e(B
mutex_unlocke$B$Oe(B%e$B$r4^$^$J$$8GDj$NJ8;zNs$rJV$7$F$$$k$N$G!":#$N$H$3$mLdBj$Oe(B
e$B$J$5$=$&$K8+$($^$9$,!"0J2<$N$h$&$K$7$?J}$,$h$$$N$G$O$J$$$G$7$g$&$+e(B?

Index: thread.c

— thread.c (revision 20609)
+++ thread.c (working copy)
@@ -2978,7 +2978,7 @@ rb_mutex_unlock(VALUE self)
GetMutexPtr(self, mutex);

 err = mutex_unlock(mutex);
  • if (err) rb_raise(rb_eThreadError, err);
  • if (err) rb_raise(rb_eThreadError, “%s”, err);

    return self;
    }

e$B%A%1%C%He(B #846 e$B$,99?7$5$l$^$7$?!#e(B (by Yukihiro M.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r20615.

http://redmine.ruby-lang.org/issues/show/846