Skip to content

Commit

Permalink
Work around format-security false positive (Fixes #9)
Browse files Browse the repository at this point in the history
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
jeremyevans committed Mar 15, 2013
1 parent 641854d commit cd097a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions 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)
Expand Down
2 changes: 1 addition & 1 deletion ext/sequel_pg/sequel_pg.c
Expand Up @@ -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) {
Expand Down

0 comments on commit cd097a6

Please sign in to comment.