Fixed some compiler warnings on old gcc versions.

This commit is contained in:
Alexandre Julliard 2006-03-02 18:03:32 +01:00
parent ca21f1541f
commit c9cc7e33ff
8 changed files with 10 additions and 16 deletions

View File

@ -150,7 +150,7 @@ HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER iface, LP
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, '.');
}

View File

@ -801,7 +801,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
rgelt->grfAttribs = atolW(pwszAttribs);
if (pceltFetched)
*pceltFetched++;
(*pceltFetched)++;
This->index++;
}
return hr;

View File

@ -129,7 +129,7 @@ static HRESULT WINAPI EnumOleSTATDATA_Next(
rgelt->dwConnection = This->index;
if (pceltFetched)
*pceltFetched++;
(*pceltFetched)++;
This->index++;
}
return hr;

View File

@ -2552,7 +2552,7 @@ int ME_AutoURLDetect(ME_TextEditor *editor, WCHAR curChar)
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;

View File

@ -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);

View File

@ -858,7 +858,7 @@ static void test_SHGetPathFromIDList(void)
/* 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);

View File

@ -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);

View File

@ -942,7 +942,7 @@ static char *get_basename( const char *link )
while (1)
{
buffer = malloc( n );
if (!buffer) break;
if (!buffer) return NULL;
r = readlink( link, buffer, n );
if (r < 0)