Skip to content

Commit

Permalink
Ignore format-nonliteral error in clang
Browse files Browse the repository at this point in the history
This is less than ideal but we can assert that the format
string is safe as they are literals in hexchat-formats.c
  • Loading branch information
wahjava authored and TingPing committed Feb 5, 2017
1 parent b38b648 commit 41fb576
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hexchat_otr.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ void printformat (IRC_CTX *ircctx, const char *nick, int lvl, int fnum, ...)

hexchat_set_context (ph, find_query_ctx);

#pragma GCC diagnostic ignored "-Wformat-nonliteral"
if (g_vsnprintf (msg, sizeof(msg), formats[fnum].def, params) < 0)
#pragma GCC diagnostic pop
g_snprintf (msg, sizeof(msg), "internal error parsing error string (BUG)");
va_end (params);
hexchat_printf (ph, "OTR: %s", s);
Expand Down

0 comments on commit 41fb576

Please sign in to comment.