From: Bryan Duxbury Date: Tue, 1 Sep 2009 22:32:50 +0000 (+0000) Subject: THRIFT-571. rb: compact_protocol.c:89: warning: format not a string literal and no... X-Git-Tag: 0.2.0~39 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=fd58c55dca197daea0df23a339a1d106dea8189b;p=common%2Fthrift.git THRIFT-571. rb: compact_protocol.c:89: warning: format not a string literal and no format arguments 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 --- diff --git a/lib/rb/ext/compact_protocol.c b/lib/rb/ext/compact_protocol.c index 7966d3e3..33a1f9f9 100644 --- a/lib/rb/ext/compact_protocol.c +++ b/lib/rb/ext/compact_protocol.c @@ -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; } }