|Description: important compiler warnings fixes

| This patch fix a compiler warning about the direct printing of strings
| using formatted printing functions without the use of a format string.
|Author: Giulio Paci <giuliopaci@gmail.com>
|Forwarded: no
|Last-Update: 2012-03-04
This commit is contained in:
asvitkine 2012-04-01 15:05:55 +00:00
parent 0c77b00081
commit c6409b4ce5
2 changed files with 2 additions and 2 deletions

View File

@ -262,7 +262,7 @@ bool ether_init(void)
// Initialize slirp library
if (net_if_type == NET_IF_SLIRP) {
if (slirp_init() < 0) {
sprintf(str, GetString(STR_SLIRP_NO_DNS_FOUND_WARN));
sprintf(str, "%s", GetString(STR_SLIRP_NO_DNS_FOUND_WARN));
WarningAlert(str);
return false;
}

View File

@ -631,7 +631,7 @@ int main(int argc, char **argv)
ErrorAlert(STR_NO_ROM_FILE_ERR);
QuitEmulator();
}
printf(GetString(STR_READING_ROM_FILE));
printf("%s", GetString(STR_READING_ROM_FILE));
ROMSize = lseek(rom_fd, 0, SEEK_END);
if (ROMSize != 64*1024 && ROMSize != 128*1024 && ROMSize != 256*1024 && ROMSize != 512*1024 && ROMSize != 1024*1024) {
ErrorAlert(STR_ROM_SIZE_ERR);