Skip to content
Browse files

Work around format-security false positive (Fixes #9)

Even though the rb_raise call is provably safe (static function
called with all static arguments), format-security still complains.
To appease it and make sequel_pg work in setups where
-Werror=format-security is used by default, use "%s" as the format
string.
  • Loading branch information...
1 parent 641854d commit cd097a6db973c819fa984470a4cd3c4d4044ccf5 @jeremyevans committed
Showing with 5 additions and 1 deletion.
  1. +4 −0 CHANGELOG
  2. +1 −1 ext/sequel_pg/sequel_pg.c
View
4 CHANGELOG
@@ -1,3 +1,7 @@
+=== HEAD
+
+* Work around format-security false positive (jeremyevans) (#9)
+
=== 1.6.5 (2013-03-06)
* Handle infinite dates using Database#convert_infinite_timestamps (jeremyevans)
View
2 ext/sequel_pg/sequel_pg.c
@@ -276,7 +276,7 @@ static VALUE spg_timestamp_error(const char *s, VALUE self, const char *error_ms
return rb_funcall(db, spg_id_infinite_timestamp_value, 1, rb_tainted_str_new2(s));
}
}
- rb_raise(rb_eArgError, error_msg);
+ rb_raise(rb_eArgError, "%s", error_msg);
}
static VALUE spg_date(const char *s, VALUE self) {

0 comments on commit cd097a6

Please sign in to comment.
Something went wrong with that request. Please try again.