gcc issues 'format not a string literal and no format arguments' when running -Werror, trick gcc into thinking everything is alright.
This commit is contained in:
parent
610777ac53
commit
de3afcce99
2 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ void instr_label::draw(void)
|
|||
}
|
||||
|
||||
} else {
|
||||
snprintf(label_buffer, sizeof( label_buffer) -1, format_buffer.c_str());
|
||||
snprintf(label_buffer, sizeof( label_buffer)-1, format_buffer.c_str(), 0);
|
||||
}
|
||||
|
||||
lenstr = getStringWidth(label_buffer);
|
||||
|
|
|
@ -144,7 +144,7 @@ void HUD::Label::draw(void)
|
|||
char buf[BUFSIZE+1];
|
||||
buf[ BUFSIZE] = '\0'; // Be sure to terminate properly
|
||||
if (_mode == NONE)
|
||||
snprintf(buf, BUFSIZE, _format.c_str());
|
||||
snprintf(buf, BUFSIZE, _format.c_str(), 0);
|
||||
else if (_mode == STRING)
|
||||
snprintf(buf, BUFSIZE, _format.c_str(), _input.getStringValue());
|
||||
else if (_mode == INT)
|
||||
|
|
Loading…
Add table
Reference in a new issue