From 73176c908b681a9500af84abfa2f7f6234f3f913 Mon Sep 17 00:00:00 2001 From: Evan Hunter Date: Sat, 8 Oct 2016 19:55:34 +0100 Subject: [PATCH] Fix warnings when building win32 module and add module to appveyor build --- appveyor.yml | 2 +- jim-win32.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 363cc61..4b3a30a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ install: - cmd: set MSYSTEM=MINGW32 - cmd: C:\msys64\usr\bin\bash -lc "pacman --sync --noconfirm make mingw-w64-i686-gcc" build_script: - - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; ./configure --full --with-ext='zlib' --disable-docs" + - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; ./configure --full --with-ext='zlib win32' --disable-docs" - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make" test_script: - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make test" diff --git a/jim-win32.c b/jim-win32.c index 3218edc..33e7117 100644 --- a/jim-win32.c +++ b/jim-win32.c @@ -92,7 +92,7 @@ Win32ErrorObj(Jim_Interp *interp, const char * szPrefix, DWORD dwError) static int Win32_ShellExecute(Jim_Interp *interp, int objc, Jim_Obj * const *objv) { - int r; + ptrdiff_t r; const char *verb, *file, *parm = NULL; char cwd[MAX_PATH + 1]; @@ -105,7 +105,7 @@ Win32_ShellExecute(Jim_Interp *interp, int objc, Jim_Obj * const *objv) GetCurrentDirectoryA(MAX_PATH + 1, cwd); if (objc == 4) parm = Jim_String(objv[3]); - r = (int)ShellExecuteA(NULL, verb, file, parm, cwd, SW_SHOWNORMAL); + r = (ptrdiff_t)ShellExecuteA(NULL, verb, file, parm, cwd, SW_SHOWNORMAL); if (r < 33) Jim_SetResult(interp, Win32ErrorObj(interp, "ShellExecute", GetLastError())); @@ -163,7 +163,7 @@ Win32_CloseWindow(Jim_Interp *interp, int objc, Jim_Obj * const *objv) static int Win32_GetActiveWindow(Jim_Interp *interp, int objc, Jim_Obj * const *objv) { - Jim_SetResult(interp, Jim_NewIntObj(interp, (DWORD)GetActiveWindow())); + Jim_SetResult(interp, Jim_NewIntObj(interp, (ptrdiff_t)GetActiveWindow())); return JIM_OK; } -- 2.11.4.GIT