mirror of
https://github.com/mirror/make.git
synced 2025-02-12 04:40:10 +08:00
Fix GCC compile warning format-security on Windows
* src/job.c (create_batch_file): Avoid non-static format strings. * src/main.c (handle_runtime_exceptions): Ditto. * src/w32/subproc/w32err.c (map_windows32_error_to_string): Ditto.
This commit is contained in:
parent
363bdaef8c
commit
8e5c96c318
@ -362,7 +362,7 @@ create_batch_file (char const *base, int unixy, int *fd)
|
||||
*fd = -1;
|
||||
if (error_string == NULL)
|
||||
error_string = _("Cannot create a temporary file");
|
||||
O (fatal, NILF, error_string);
|
||||
OS (fatal, NILF, "%s", error_string);
|
||||
|
||||
/* not reached */
|
||||
return NULL;
|
||||
|
@ -955,7 +955,7 @@ handle_runtime_exceptions (struct _EXCEPTION_POINTERS *exinfo)
|
||||
sprintf (errmsg,
|
||||
_("%s: Interrupt/Exception caught (code = 0x%lx, addr = 0x%p)\n"),
|
||||
prg, exrec->ExceptionCode, exrec->ExceptionAddress);
|
||||
fprintf (stderr, errmsg);
|
||||
fputs (errmsg, stderr);
|
||||
exit (255);
|
||||
}
|
||||
|
||||
@ -994,7 +994,7 @@ handle_runtime_exceptions (struct _EXCEPTION_POINTERS *exinfo)
|
||||
#endif
|
||||
|
||||
/* Write the error to stderr too */
|
||||
fprintf (stderr, errmsg);
|
||||
fputs (errmsg, stderr);
|
||||
|
||||
#ifdef DEBUG
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
|
@ -56,7 +56,7 @@ map_windows32_error_to_string (DWORD ercode) {
|
||||
* Special code for winsock error handling.
|
||||
*/
|
||||
if (ercode > WSABASEERR) {
|
||||
O (fatal, NILF, szMessageBuffer);
|
||||
OS (fatal, NILF, "%s", szMessageBuffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user