1
0
Fork 0

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:
Erik Hofman 2010-06-26 09:36:48 +02:00
parent 610777ac53
commit de3afcce99
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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)