Fix GCC compile warning for "format-signedness" in Windows

* src/job.c (reap_children): Use unsigned int for DWORD.
* src/w32/subproc/sub_proc.c (process_easy): Ditto.
* src/w32/w32os.c (jobserver_setup): Ditto.
(jobserver_release): Ditto.
(jobserver_acquire): Ditto.
This commit is contained in:
Torbjörn SVENSSON 2023-06-09 21:00:31 +02:00 committed by Paul Smith
parent ee366afbf1
commit 8d76fb8778
3 changed files with 8 additions and 8 deletions

View File

@ -816,7 +816,7 @@ reap_children (int block, int err)
{
DWORD e = GetLastError ();
fprintf (stderr,
"Determine main thread ID (Error %ld: %s)\n",
"Determine main thread ID (Error %lu: %s)\n",
e, map_windows32_error_to_string (e));
}
else

View File

@ -1476,7 +1476,7 @@ process_easy(
CloseHandle(tmpIn);
}
if (hIn == INVALID_HANDLE_VALUE) {
fprintf(stderr, "process_easy: DuplicateHandle(In) failed (e=%ld)\n", e);
fprintf(stderr, "process_easy: DuplicateHandle(In) failed (e=%lu)\n", e);
return INVALID_HANDLE_VALUE;
}
}
@ -1506,7 +1506,7 @@ process_easy(
CloseHandle(tmpOut);
}
if (hOut == INVALID_HANDLE_VALUE) {
fprintf(stderr, "process_easy: DuplicateHandle(Out) failed (e=%ld)\n", e);
fprintf(stderr, "process_easy: DuplicateHandle(Out) failed (e=%lu)\n", e);
return INVALID_HANDLE_VALUE;
}
}
@ -1536,7 +1536,7 @@ process_easy(
CloseHandle(tmpErr);
}
if (hErr == INVALID_HANDLE_VALUE) {
fprintf(stderr, "process_easy: DuplicateHandle(Err) failed (e=%ld)\n", e);
fprintf(stderr, "process_easy: DuplicateHandle(Err) failed (e=%lu)\n", e);
return INVALID_HANDLE_VALUE;
}
}

View File

@ -238,7 +238,7 @@ jobserver_setup (int slots, const char *style)
DWORD err = GetLastError ();
const char *estr = map_windows32_error_to_string (err);
ONS (fatal, NILF,
_("creating jobserver semaphore: (Error %ld: %s)"), err, estr);
_("creating jobserver semaphore: (Error %lu: %s)"), err, estr);
}
return 1;
@ -257,7 +257,7 @@ jobserver_parse_auth (const char *auth)
DWORD err = GetLastError ();
const char *estr = map_windows32_error_to_string (err);
error (NILF, strlen (auth) + INTSTR_LENGTH + strlen (estr),
_("unable to open jobserver semaphore '%s': (Error %ld: %s)"),
_("unable to open jobserver semaphore '%s': (Error %lu: %s)"),
auth, err, estr);
return 0;
}
@ -310,7 +310,7 @@ jobserver_release (int is_fatal)
DWORD err = GetLastError ();
const char *estr = map_windows32_error_to_string (err);
ONS (fatal, NILF,
_("release jobserver semaphore: (Error %ld: %s)"), err, estr);
_("release jobserver semaphore: (Error %lu: %s)"), err, estr);
}
perror_with_name ("release_jobserver_semaphore", "");
}
@ -381,7 +381,7 @@ jobserver_acquire (int timeout UNUSED)
DWORD err = GetLastError ();
const char *estr = map_windows32_error_to_string (err);
ONS (fatal, NILF,
_("semaphore or child process wait: (Error %ld: %s)"),
_("semaphore or child process wait: (Error %lu: %s)"),
err, estr);
}