Skip to content

Commit

Permalink
Ignore format-nonliteral error in newer GCC
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
TingPing committed May 20, 2016
1 parent 243efd2 commit 12f8470
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/otr_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ static void context_add_app_info (void *data, ConnContext *co)
co->app_data_free = context_free_app_info;

coi->ircctx = ircctx;

#pragma GCC diagnostic ignored "-Wformat-nonliteral"
g_snprintf (coi->better_msg_two, sizeof(coi->better_msg_two),
formats[TXT_OTR_BETTER_TWO].def, co->accountname);
#pragma GCC diagnostic pop
}

/*
Expand Down

0 comments on commit 12f8470

Please sign in to comment.