Skip to content

Commit

Permalink
add format attribute to set_dbparam
Browse files Browse the repository at this point in the history
src/tcbtdb.c:124:49: error: format string is not a string literal
      [-Werror,-Wformat-nonliteral]
  n = vsnprintf (params + len, DB_PARAMS - len, fmt, args);
                                                ^~~
1 error generated.
  • Loading branch information
cgzones committed Nov 15, 2019
1 parent 8ffcc5d commit d0843fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tcbtdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ tc_db_rmdir ()
* On error, a negative number is returned.
* On success, the number of characters that would have been written is
* returned. */
#if defined(__GNUC__) || defined(__clang__)
__attribute__((__format__(printf,3,4)))
#endif
static int
set_dbparam (char *params, int len, const char *fmt, ...)
{
Expand Down

0 comments on commit d0843fa

Please sign in to comment.