THRIFT-571. rb: compact_protocol.c:89: warning: format not a string literal and no...
authorBryan Duxbury <bryanduxbury@apache.org>
Tue, 1 Sep 2009 22:32:50 +0000 (22:32 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Tue, 1 Sep 2009 22:32:50 +0000 (22:32 +0000)
This patch solves the issue for those of you on Ruby 1.9.1.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810288 13f79535-47bb-0310-9956-ffa450edef68

lib/rb/ext/compact_protocol.c

index 7966d3e..33a1f9f 100644 (file)
@@ -86,7 +86,7 @@ static int get_compact_type(VALUE type_value) {
   } else {
     char str[50];
     sprintf(str, "don't know what type: %d", type);
-    rb_raise(rb_eStandardError, str);
+    rb_raise(rb_eStandardError, "%s", str);
     return 0;
   }
 }
@@ -348,7 +348,7 @@ static int8_t get_ttype(int8_t ctype) {
   } else {
     char str[50];
     sprintf(str, "don't know what type: %d", ctype);
-    rb_raise(rb_eStandardError, str);
+    rb_raise(rb_eStandardError, "%s", str);
     return 0;
   }
 }