From: Eric S. Raymond Date: Sun, 11 Jun 2017 22:57:07 +0000 (-0400) Subject: Clean up compiler warnings. X-Git-Tag: 1.1~405 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=32b04f190ec31b841d0628af2346a914adce7c3e Clean up compiler warnings. --- diff --git a/misc.c b/misc.c index 9da70dc..dde0063 100644 --- a/misc.c +++ b/misc.c @@ -78,7 +78,7 @@ void newspeak(char* msg) if (msg[i + 1] == 'd') { copy[i + 1] = 's'; - sprintf(parameters[pi], "%d", PARMS[pi]); + sprintf(parameters[pi], "%ld", PARMS[pi]); } // Unmodified string specifier. @@ -128,7 +128,7 @@ void newspeak(char* msg) // Render the final string. char rendered[2000]; // FIXME: to be replaced with dynamic allocation - sprintf(&rendered, copy, parameters[1], parameters[2], parameters[3], parameters[4]); // FIXME: to be replaced with vsprintf() + sprintf((char *)&rendered, copy, parameters[1], parameters[2], parameters[3], parameters[4]); // FIXME: to be replaced with vsprintf() // Print the message. printf("%s\n", rendered);