mirror of
https://github.com/mirror/make.git
synced 2025-03-25 09:10:30 +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;
|
*fd = -1;
|
||||||
if (error_string == NULL)
|
if (error_string == NULL)
|
||||||
error_string = _("Cannot create a temporary file");
|
error_string = _("Cannot create a temporary file");
|
||||||
O (fatal, NILF, error_string);
|
OS (fatal, NILF, "%s", error_string);
|
||||||
|
|
||||||
/* not reached */
|
/* not reached */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -955,7 +955,7 @@ handle_runtime_exceptions (struct _EXCEPTION_POINTERS *exinfo)
|
|||||||
sprintf (errmsg,
|
sprintf (errmsg,
|
||||||
_("%s: Interrupt/Exception caught (code = 0x%lx, addr = 0x%p)\n"),
|
_("%s: Interrupt/Exception caught (code = 0x%lx, addr = 0x%p)\n"),
|
||||||
prg, exrec->ExceptionCode, exrec->ExceptionAddress);
|
prg, exrec->ExceptionCode, exrec->ExceptionAddress);
|
||||||
fprintf (stderr, errmsg);
|
fputs (errmsg, stderr);
|
||||||
exit (255);
|
exit (255);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -994,7 +994,7 @@ handle_runtime_exceptions (struct _EXCEPTION_POINTERS *exinfo)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Write the error to stderr too */
|
/* Write the error to stderr too */
|
||||||
fprintf (stderr, errmsg);
|
fputs (errmsg, stderr);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
|
@ -56,7 +56,7 @@ map_windows32_error_to_string (DWORD ercode) {
|
|||||||
* Special code for winsock error handling.
|
* Special code for winsock error handling.
|
||||||
*/
|
*/
|
||||||
if (ercode > WSABASEERR) {
|
if (ercode > WSABASEERR) {
|
||||||
O (fatal, NILF, szMessageBuffer);
|
OS (fatal, NILF, "%s", szMessageBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user