libgimpbase, tools: clean some warnings on a Win32 build.

This commit is contained in:
Jehan 2018-01-26 22:14:11 +01:00
parent a700b15e37
commit 9ca8899a12
2 changed files with 7 additions and 5 deletions

View file

@ -200,7 +200,7 @@ is_script (const gchar *filename)
if (exts == NULL) if (exts == NULL)
{ {
pathext = g_getenv ("PATHEXT"); pathext = (gchar *) g_getenv ("PATHEXT");
if (pathext != NULL) if (pathext != NULL)
{ {
exts = g_strsplit (pathext, G_SEARCHPATH_SEPARATOR_S, 100); exts = g_strsplit (pathext, G_SEARCHPATH_SEPARATOR_S, 100);

View file

@ -28,7 +28,7 @@ resume_process (DWORD dwOwnerPID)
if (te32.th32OwnerProcessID == dwOwnerPID) if (te32.th32OwnerProcessID == dwOwnerPID)
{ {
HANDLE hThread = OpenThread (THREAD_SUSPEND_RESUME, FALSE, te32.th32ThreadID); HANDLE hThread = OpenThread (THREAD_SUSPEND_RESUME, FALSE, te32.th32ThreadID);
printf ("Resuming Thread: %u\n",te32.th32ThreadID); printf ("Resuming Thread: %u\n", (unsigned int) te32.th32ThreadID);
ResumeThread (hThread); ResumeThread (hThread);
CloseHandle (hThread); CloseHandle (hThread);
} }
@ -62,7 +62,9 @@ process_list (void)
{ {
do do
{ {
printf ("PID:\t%u\t%s\n", pe32.th32ProcessID, pe32.szExeFile); printf ("PID:\t%u\t%s\n",
(unsigned int) pe32.th32ProcessID,
pe32.szExeFile);
} }
while (Process32Next (hProcessSnap, &pe32)); while (Process32Next (hProcessSnap, &pe32));
bRet = TRUE; bRet = TRUE;
@ -90,12 +92,12 @@ main (int argc,
pid = atoi (argv[1]); pid = atoi (argv[1]);
if (pid == 0) if (pid == 0)
{ {
printf ("invalid: %s\n", pid); printf ("invalid: %lu\n", pid);
return 1; return 1;
} }
else else
{ {
printf ("process: %u\n", pid); printf ("process: %lu\n", pid);
resume_process (pid); resume_process (pid);
} }
} }