Alexandre Julliard : Fixed some compiler warnings on old gcc versions.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 2 11:12:04 CST 2006
Module: wine
Branch: refs/heads/master
Commit: c9cc7e33ffaaf9b359d6bccf778e34d1b955a517
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c9cc7e33ffaaf9b359d6bccf778e34d1b955a517
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Mar 2 18:03:32 2006 +0100
Fixed some compiler warnings on old gcc versions.
---
dlls/dxdiagn/container.c | 2 +-
dlls/ole32/ole2.c | 2 +-
dlls/ole32/oleobj.c | 2 +-
dlls/riched20/editor.c | 2 +-
dlls/riched20/tests/editor.c | 12 +++---------
dlls/shell32/tests/shlfolder.c | 2 +-
include/ddk/wdm.h | 2 +-
server/change.c | 2 +-
8 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/dlls/dxdiagn/container.c b/dlls/dxdiagn/container.c
index aa15d10..1810269 100644
--- a/dlls/dxdiagn/container.c
+++ b/dlls/dxdiagn/container.c
@@ -150,7 +150,7 @@ HRESULT WINAPI IDxDiagContainerImpl_GetC
hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer);
if (!SUCCEEDED(hr) || NULL == pContainer)
goto on_error;
- *cur++; /* go after '.' (just replaced by \0) */
+ cur++; /* go after '.' (just replaced by \0) */
tmp = cur;
cur = strchrW(tmp, '.');
}
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index beb485e..1c61ff9 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -801,7 +801,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
rgelt->grfAttribs = atolW(pwszAttribs);
if (pceltFetched)
- *pceltFetched++;
+ (*pceltFetched)++;
This->index++;
}
return hr;
diff --git a/dlls/ole32/oleobj.c b/dlls/ole32/oleobj.c
index 78e1ebc..68cc8b8 100644
--- a/dlls/ole32/oleobj.c
+++ b/dlls/ole32/oleobj.c
@@ -129,7 +129,7 @@ static HRESULT WINAPI EnumOleSTATDATA_Ne
rgelt->dwConnection = This->index;
if (pceltFetched)
- *pceltFetched++;
+ (*pceltFetched)++;
This->index++;
}
return hr;
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index a07f086..506c706 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2552,7 +2552,7 @@ int ME_AutoURLDetect(ME_TextEditor *edit
int sel_min, sel_max;
int car_pos = 0;
int text_pos=-1;
- int URLmin, URLmax;
+ int URLmin, URLmax = 0;
CHARRANGE url;
FINDTEXTA ft;
CHARFORMAT2W cur_format;
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 8835f08..95cf705 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -621,15 +621,9 @@ static void test_EM_SCROLL()
SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "a");/* one line of text */
expr = 0x00010000;
for (i = 0; i < 4; i++) {
- int cmd;
- switch (i) {
- case 0: cmd = SB_PAGEDOWN; break;
- case 1: cmd = SB_PAGEUP; break;
- case 2: cmd = SB_LINEDOWN; break;
- case 3: cmd = SB_LINEUP; break;
- }
-
- r = SendMessage(hwndRichEdit, EM_SCROLL, cmd, 0);
+ static const int cmd[4] = { SB_PAGEDOWN, SB_PAGEUP, SB_LINEDOWN, SB_LINEUP };
+
+ r = SendMessage(hwndRichEdit, EM_SCROLL, cmd[i], 0);
y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0);
ok(expr == r, "EM_SCROLL improper return value returned (i == %d). "
"Got 0x%08x, expected 0x%08x\n", i, r, expr);
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index ce638e0..25bac9d 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -858,7 +858,7 @@ static void test_SHGetPathFromIDList(voi
/* Test if we can get the path from the start menu "program files" PIDL. */
hShell32 = GetModuleHandleA("shell32");
- pSHGetSpecialFolderLocation = (HRESULT(WINAPI*)(HWND,int,LPITEMIDLIST*))GetProcAddress(hShell32, "SHGetSpecialFolderLocation");
+ pSHGetSpecialFolderLocation = (void *)GetProcAddress(hShell32, "SHGetSpecialFolderLocation");
hr = pSHGetSpecialFolderLocation(NULL, CSIDL_PROGRAM_FILES, &pidlPrograms);
ok(SUCCEEDED(hr), "SHGetFolderLocation failed: 0x%08lx\n", hr);
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index b10a6f1..7c5160c 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -833,7 +833,7 @@ typedef struct _KUSER_SHARED_DATA {
union {
volatile KSYSTEM_TIME TickCount;
volatile ULONG64 TickCountQuad;
- };
+ } DUMMYUNIONNAME;
} KSHARED_USER_DATA, *PKSHARED_USER_DATA;
NTSTATUS WINAPI ObCloseHandle(IN HANDLE handle);
diff --git a/server/change.c b/server/change.c
index cef1c3e..4349d7e 100644
--- a/server/change.c
+++ b/server/change.c
@@ -942,7 +942,7 @@ static char *get_basename( const char *l
while (1)
{
buffer = malloc( n );
- if (!buffer) break;
+ if (!buffer) return NULL;
r = readlink( link, buffer, n );
if (r < 0)
More information about the wine-cvs
mailing list