diff --git a/Contrib/Makensisw/makensisw.cpp b/Contrib/Makensisw/makensisw.cpp index 916db695..54dde66b 100644 --- a/Contrib/Makensisw/makensisw.cpp +++ b/Contrib/Makensisw/makensisw.cpp @@ -307,11 +307,11 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { return TRUE; } else { - int this_compressor; + int this_compressor=0; int last_compressor; int i; HANDLE hPrev, hThis; - DWORD prevSize, thisSize; + DWORD prevSize=0, thisSize=0; for(i=(int)COMPRESSOR_SCRIPT+2; i<(int)COMPRESSOR_BEST; i++) { @@ -1057,7 +1057,7 @@ BOOL CALLBACK SettingsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELCOUNT, 0, 0); int *items = (int *)GlobalAlloc(GPTR, n*sizeof(int)); - int rv = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELITEMS, (WPARAM)n, (LPARAM)items); + SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELITEMS, (WPARAM)n, (LPARAM)items); int i; for(i=n-1;i>=0;i--) { SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_DELETESTRING, (WPARAM)items[i], 0); diff --git a/Contrib/Makensisw/utils.cpp b/Contrib/Makensisw/utils.cpp index 4a505cf0..a5b6a66e 100644 --- a/Contrib/Makensisw/utils.cpp +++ b/Contrib/Makensisw/utils.cpp @@ -435,7 +435,7 @@ char** LoadSymbolSet(char *name) DWORD t; DWORD bufSize; DWORD i = 0; - HGLOBAL hMem; + HGLOBAL hMem = NULL; while(TRUE) { l = 0; @@ -582,7 +582,6 @@ int InitBranding() { } char szBuf[1024]; DWORD dwRead = 1; - DWORD dwExit = !STILL_ACTIVE; if (WaitForSingleObject(pi.hProcess,10000)!=WAIT_OBJECT_0) { return 0; } diff --git a/Source/ResourceVersionInfo.cpp b/Source/ResourceVersionInfo.cpp index dcf4cfb5..5fac1718 100644 --- a/Source/ResourceVersionInfo.cpp +++ b/Source/ResourceVersionInfo.cpp @@ -168,7 +168,7 @@ void SaveVersionHeader (GrowBuf &strm, WORD wLength, WORD wValueLength, WORD wTy strm.add (&wValueLength, sizeof (wValueLength)); strm.add (&wType, sizeof (wType)); - keyLen = (winchar_strlen(key) + 1) * sizeof (WCHAR); + keyLen = WORD((winchar_strlen(key) + 1) * sizeof (WCHAR)); strm.add ((void*)key, keyLen); PadStream(strm); @@ -177,7 +177,7 @@ void SaveVersionHeader (GrowBuf &strm, WORD wLength, WORD wValueLength, WORD wTy { valueLen = wValueLength; if ( wType == 1 ) - valueLen = valueLen * sizeof (WCHAR); + valueLen = valueLen * WORD(sizeof (WCHAR)); strm.add (value, valueLen); } } @@ -213,15 +213,15 @@ void CResourceVersionInfo::ExportToStream(GrowBuf &strm, int Index) p = stringInfoStream.getlen(); KeyName = winchar_fromansi(pChildStrings->getname(i), codepage); KeyValue = winchar_fromansi(pChildStrings->getvalue(i), codepage); - SaveVersionHeader (stringInfoStream, 0, winchar_strlen(KeyValue) + 1, 1, KeyName, (void*)KeyValue); + SaveVersionHeader (stringInfoStream, 0, WORD(winchar_strlen(KeyValue) + 1), 1, KeyName, (void*)KeyValue); delete [] KeyName; delete [] KeyValue; - wSize = stringInfoStream.getlen() - p; + wSize = WORD(stringInfoStream.getlen() - p); *(WORD*)((PBYTE)stringInfoStream.get()+p)=wSize; } - wSize = stringInfoStream.getlen(); + wSize = WORD(stringInfoStream.getlen()); *(WORD*)((PBYTE)stringInfoStream.get())=wSize; PadStream (strm); @@ -230,7 +230,7 @@ void CResourceVersionInfo::ExportToStream(GrowBuf &strm, int Index) SaveVersionHeader (strm, 0, 0, 0, KeyName, &ZEROS); delete [] KeyName; strm.add (stringInfoStream.get(), stringInfoStream.getlen()); - wSize = strm.getlen() - p; + wSize = WORD(strm.getlen() - p); *(WORD*)((PBYTE)strm.get()+p)=wSize; } @@ -263,17 +263,17 @@ void CResourceVersionInfo::ExportToStream(GrowBuf &strm, int Index) } } - wSize = strm.getlen() - p1; + wSize = WORD(strm.getlen() - p1); *(WORD*)((PBYTE)strm.get()+p1)=wSize; - wSize = sizeof (int) * m_ChildStringLists.getnum(); + wSize = WORD(sizeof (int) * m_ChildStringLists.getnum()); p1+=sizeof(WORD); *(WORD*)((PBYTE)strm.get()+p1)=wSize; - wSize = strm.getlen() - p; + wSize = WORD(strm.getlen() - p); *(WORD*)((PBYTE)strm.get()+p)=wSize; } - wSize = strm.getlen(); + wSize = WORD(strm.getlen()); *(WORD*)((PBYTE)strm.get())=wSize; }