Kill some compiler warnings under Linux and mingw32
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4994 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
edeb26b7a7
commit
747ad310e5
25 changed files with 37 additions and 37 deletions
|
@ -117,7 +117,7 @@ NSISFunc(SetBg) {
|
|||
|
||||
hWndImage = CreateWindowEx(
|
||||
WS_EX_TOOLWINDOW,
|
||||
(LPSTR)atomClass,
|
||||
(LPSTR)(DWORD)atomClass,
|
||||
0,
|
||||
WS_CLIPSIBLINGS|WS_POPUP,
|
||||
0,
|
||||
|
@ -225,7 +225,7 @@ NSISFunc(AddImage) {
|
|||
}
|
||||
|
||||
newImg->iType = MIL_BITMAP;
|
||||
newImg->cTransparent = -1;
|
||||
newImg->cTransparent = (COLORREF)-1;
|
||||
|
||||
popstring(szTemp);
|
||||
if (!lstrcmpi(szTemp, "/TRANSPARENT")) {
|
||||
|
|
|
@ -731,7 +731,7 @@ BOOL CALLBACK ParentWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPara
|
|||
if (message == WM_NOTIFY_OUTER_NEXT && !bRes)
|
||||
{
|
||||
// if leave function didn't abort (bRes != 0 in that case)
|
||||
if (wParam == -1)
|
||||
if (wParam == (WPARAM)-1)
|
||||
g_is_back++;
|
||||
if (wParam == NOTIFY_BYE_BYE)
|
||||
g_is_cancel++;
|
||||
|
@ -1254,7 +1254,7 @@ int WINAPI createCfgDlg()
|
|||
FREE(pszList);
|
||||
if (pField->pszState) {
|
||||
if (pField->nFlags & (LBS_MULTIPLESEL|LBS_EXTENDEDSEL) && nFindMsg == LB_FINDSTRINGEXACT) {
|
||||
mySendMessage(hwCtrl, LB_SETSEL, FALSE, -1);
|
||||
mySendMessage(hwCtrl, LB_SETSEL, FALSE, (LPARAM)-1);
|
||||
pszStart = pszEnd = pField->pszState;
|
||||
for (;;) {
|
||||
char c = *pszEnd;
|
||||
|
@ -1262,7 +1262,7 @@ int WINAPI createCfgDlg()
|
|||
*pszEnd = '\0';
|
||||
if (*pszStart)
|
||||
{
|
||||
int nItem = mySendMessage(hwCtrl, LB_FINDSTRINGEXACT, -1, (LPARAM)pszStart);
|
||||
int nItem = mySendMessage(hwCtrl, LB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)pszStart);
|
||||
if (nItem != LB_ERR)
|
||||
mySendMessage(hwCtrl, LB_SETSEL, TRUE, nItem);
|
||||
}
|
||||
|
@ -1275,7 +1275,7 @@ int WINAPI createCfgDlg()
|
|||
}
|
||||
}
|
||||
else {
|
||||
int nItem = mySendMessage(hwCtrl, nFindMsg, -1, (LPARAM)pField->pszState);
|
||||
int nItem = mySendMessage(hwCtrl, nFindMsg, (WPARAM)-1, (LPARAM)pField->pszState);
|
||||
if (nItem != CB_ERR) { // CB_ERR == LB_ERR == -1
|
||||
mySendMessage(hwCtrl, nSetSelMsg, nItem, 0);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
|||
SetClassLong(hwndDlg,GCL_HICON,(long)hIcon);
|
||||
// Altered by Darren Owen (DrO) on 29/9/2003
|
||||
// Added in receiving of mouse and key events from the richedit control
|
||||
SendMessage(GetDlgItem(hwndDlg,IDC_LOGWIN),EM_SETEVENTMASK,NULL,ENM_SELCHANGE|ENM_MOUSEEVENTS|ENM_KEYEVENTS);
|
||||
SendMessage(GetDlgItem(hwndDlg,IDC_LOGWIN),EM_SETEVENTMASK,(WPARAM)NULL,ENM_SELCHANGE|ENM_MOUSEEVENTS|ENM_KEYEVENTS);
|
||||
DragAcceptFiles(g_sdata.hwnd,FALSE);
|
||||
g_sdata.menu = GetMenu(g_sdata.hwnd);
|
||||
g_sdata.fileSubmenu = FindSubMenu(g_sdata.menu, IDM_FILE);
|
||||
|
@ -207,7 +207,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
|||
case WM_DROPFILES: {
|
||||
int num;
|
||||
char szTmp[MAX_PATH];
|
||||
num = DragQueryFile((HDROP)wParam,-1,NULL,0);
|
||||
num = DragQueryFile((HDROP)wParam,(UINT)-1,NULL,0);
|
||||
if (num==1) {
|
||||
DragQueryFile((HDROP)wParam,0,szTmp,MAX_PATH);
|
||||
if (lstrlen(szTmp)>0) {
|
||||
|
@ -295,14 +295,14 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
|||
|
||||
if(FileExists(temp_file_name)) {
|
||||
hPrev = CreateFile(temp_file_name,GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, NULL, NULL);
|
||||
NULL, OPEN_EXISTING, (DWORD)NULL, NULL);
|
||||
if(hPrev != INVALID_HANDLE_VALUE) {
|
||||
prevSize = GetFileSize(hPrev, 0);
|
||||
CloseHandle(hPrev);
|
||||
|
||||
if(prevSize != INVALID_FILE_SIZE) {
|
||||
hThis = CreateFile(g_sdata.output_exe,GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, NULL, NULL);
|
||||
NULL, OPEN_EXISTING, (DWORD)NULL, NULL);
|
||||
if(hThis != INVALID_HANDLE_VALUE) {
|
||||
thisSize = GetFileSize(hThis, 0);
|
||||
CloseHandle(hThis);
|
||||
|
@ -1177,10 +1177,10 @@ BOOL CALLBACK SymbolSetProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
|
|||
else {
|
||||
HWND hwndParent = GetParent(hwndDlg);
|
||||
if(g_symbol_set_mode == 1) { //Load
|
||||
SendMessage(hwndParent, WM_MAKENSIS_LOADSYMBOLSET, (WPARAM)name, NULL);
|
||||
SendMessage(hwndParent, WM_MAKENSIS_LOADSYMBOLSET, (WPARAM)name, (LPARAM)NULL);
|
||||
}
|
||||
else {
|
||||
SendMessage(hwndParent, WM_MAKENSIS_SAVESYMBOLSET, (WPARAM)name, NULL);
|
||||
SendMessage(hwndParent, WM_MAKENSIS_SAVESYMBOLSET, (WPARAM)name, (LPARAM)NULL);
|
||||
}
|
||||
EndDialog(hwndDlg, TRUE);
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ void ShowToolbarDropdownMenu()
|
|||
RECT rect;
|
||||
GetWindowRect(g_toolbar.hwnd, (LPRECT) &rect);
|
||||
TrackPopupMenu(g_toolbar.dropdownmenu,
|
||||
NULL,
|
||||
(UINT)NULL,
|
||||
rect.left + (int)(short)g_toolbar.dropdownpoint.x,
|
||||
rect.top + (int)(short)g_toolbar.dropdownpoint.y,
|
||||
0,
|
||||
|
|
|
@ -656,7 +656,7 @@ char* BuildSymbols()
|
|||
}
|
||||
else {
|
||||
buf = (char *)GlobalAlloc(GPTR, sizeof(char));
|
||||
buf[0] = NULL;
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
|
|
@ -276,7 +276,7 @@ void FloatFormatF(char *s, double value, int prec)
|
|||
|
||||
void FloatFormatE(char *s, double fnum, int options)
|
||||
{
|
||||
int fpower, fsign, fdigit, fprec = 0, prec, fzfill = 0;
|
||||
int fpower, fsign, fdigit, fprec = 0, prec;
|
||||
double sfnum;
|
||||
|
||||
prec = options & 0xF;
|
||||
|
|
|
@ -356,7 +356,7 @@ __declspec(dllexport) void download (HWND parent,
|
|||
get=new JNL_HTTPGet(JNL_CONNECTION_AUTODNS,16384,(p&&p[0])?p:NULL);
|
||||
int st;
|
||||
int has_printed_headers = 0;
|
||||
int cl;
|
||||
int cl = 0;
|
||||
int len;
|
||||
int sofar = 0;
|
||||
DWORD last_recv_time=start_time;
|
||||
|
|
|
@ -115,7 +115,7 @@ void __declspec(dllexport) Show(HWND hwndParent, int string_size, char *variable
|
|||
while (!g_done)
|
||||
{
|
||||
MSG msg;
|
||||
int nResult = GetMessage(&msg, NULL, 0, 0);
|
||||
GetMessage(&msg, NULL, 0, 0);
|
||||
if (!IsDialogMessage(hwStartMenuSelect,&msg) && !IsDialogMessage(hwndParent,&msg) && !TranslateMessage(&msg))
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ void __declspec(dllexport) GetAccountType(HWND hwndParent, int string_size,
|
|||
// to explicitly deallocate it. That happens automatically
|
||||
// when we exit this function.
|
||||
|
||||
if (ptg = GlobalAlloc(GPTR, cbTokenGroups))
|
||||
if ((ptg = GlobalAlloc(GPTR, cbTokenGroups)))
|
||||
{
|
||||
|
||||
// Now we ask for the group information again.
|
||||
|
|
|
@ -180,7 +180,7 @@ int main( int argc, char * argv[] ) {
|
|||
// remove existing patch with sourceCRC
|
||||
TFileOffset fileCount = 0;
|
||||
while(true) {
|
||||
TFileOffset previousPatchSize;
|
||||
TFileOffset previousPatchSize = 0;
|
||||
try {
|
||||
previousPatchSize = POSIX::getFileSize(patchFileName.c_str());
|
||||
} catch(const char* s) {
|
||||
|
|
|
@ -187,7 +187,7 @@ params:
|
|||
DWORD dwExit = !STILL_ACTIVE;
|
||||
DWORD dwLastOutput;
|
||||
static char szBuf[1024];
|
||||
HGLOBAL hUnusedBuf;
|
||||
HGLOBAL hUnusedBuf = NULL;
|
||||
char *szUnusedBuf = 0;
|
||||
|
||||
if (log) {
|
||||
|
@ -255,7 +255,7 @@ params:
|
|||
}
|
||||
|
||||
if (!(log & 2)) {
|
||||
while (p = my_strstr(p, "\t")) {
|
||||
while ((p = my_strstr(p, "\t"))) {
|
||||
if ((int)(p - szUnusedBuf) > (int)(GlobalSize(hUnusedBuf) - TAB_REPLACE_SIZE - 1))
|
||||
{
|
||||
*p++ = ' ';
|
||||
|
|
|
@ -668,7 +668,7 @@ BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_DROPFILES:
|
||||
{
|
||||
char dropped_file[MAX_PATH]="";
|
||||
if (DragQueryFile((HDROP)wParam,-1,NULL,0)==1)
|
||||
if (DragQueryFile((HDROP)wParam,(UINT)-1,NULL,0)==1)
|
||||
{
|
||||
DragQueryFile((HDROP)wParam,0,dropped_file,MAX_PATH);
|
||||
if (lstrlen(dropped_file)>0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue