From 015aea3f496c2a8ee32267d10b636e9c4c7a7fe3 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sun, 11 Dec 2016 21:01:48 +0000 Subject: [PATCH] Fixed some minor GCC warnings git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6817 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/MakeLangId/MakeLangId.cpp | 8 ++++---- Contrib/zip2exe/main.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Contrib/MakeLangId/MakeLangId.cpp b/Contrib/MakeLangId/MakeLangId.cpp index fcabe144..30873e83 100644 --- a/Contrib/MakeLangId/MakeLangId.cpp +++ b/Contrib/MakeLangId/MakeLangId.cpp @@ -230,9 +230,9 @@ static const INTLNG g_IntLang[] = { HWND g_hList; -static UINT AddLocale(HWND hCtl, LPCTSTR Name, UINT LangId) +static INT AddLocale(HWND hCtl, LPCTSTR Name, UINT LangId) { - UINT idx = SendMessage(hCtl, CB_ADDSTRING, 0, (LPARAM) Name); + INT idx = SendMessage(hCtl, CB_ADDSTRING, 0, (LPARAM) Name); if (idx != CB_ERR) SendMessage(hCtl, CB_SETITEMDATA, idx, LangId); return idx; } @@ -374,6 +374,6 @@ EXTERN_C void NSISWinMainNOCRT() InitCommonControls(); HINSTANCE hInst = GetModuleHandle(0); HANDLE hIco = LoadImage(hInst, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE|LR_SHARED); - DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_DIALOG), 0, DialogProc, (LPARAM) hIco); - ExitProcess(0); + INT_PTR retval = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_DIALOG), 0, DialogProc, (LPARAM) hIco); + ExitProcess((UINT) retval); } diff --git a/Contrib/zip2exe/main.cpp b/Contrib/zip2exe/main.cpp index b130a590..d5a137d8 100644 --- a/Contrib/zip2exe/main.cpp +++ b/Contrib/zip2exe/main.cpp @@ -98,7 +98,7 @@ int WINAPI _tWinMain(HINSTANCE hInst,HINSTANCE hOldInst,LPTSTR CmdLineParams,int static bool IsEncrypted(unz_file_info&zfi) { const unsigned short gpf_encrypted = (1<< 0); // 2.0.0+ - const unsigned short gpf_encstrong = (1<< 6); // 5.0.0+ APPNOTE says that bit 0 MUST be set if bit 6 is set + //nst unsigned short gpf_encstrong = (1<< 6); // 5.0.0+ APPNOTE says that bit 0 MUST be set if bit 6 is set const unsigned short gpf_enccntdir = (1<<13); // 6.2.0+ Central Directory Encryption return (zfi.flag & (gpf_encrypted|gpf_enccntdir)) != 0; }