I am re-submitting this patch because Mike McCormack pointed out that my changes to shellpath.c change the program flow. I also fixed some other functions in shellpath.c which were victim to the same mistake. Changelog: dlls/ddraw/dsurface/fakezbuffer.c dlls/ntdll/rtlstr.c dlls/shell32/shellpath.c dlls/user/wnd16.c - void functions can't return a value, even if it is the return value from another void function. - Fixed program flow in shellpath.c when SHELL_OsIsUnicode() returns true. Gregg Mattinson Co-op Developer Sun Microsystems of Canada
Index: dlls/ddraw/dsurface/fakezbuffer.c =================================================================== RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/ddraw/dsurface/fakezbuffer.c,v retrieving revision 1.1 diff -u -r1.1 fakezbuffer.c --- /tmp/T0ZRaGEK Mon Jul 8 09:40:53 2002 +++ fakezbuffer.c Mon Jun 24 16:44:29 2002 @@ -90,7 +90,7 @@ void FakeZBuffer_DirectDrawSurface_final_release(IDirectDrawSurfaceImpl* This) { - return Main_DirectDrawSurface_final_release(This); + Main_DirectDrawSurface_final_release(This); } HRESULT Index: dlls/ntdll/rtlstr.c =================================================================== RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/ntdll/rtlstr.c,v retrieving revision 1.1 diff -u -r1.1 rtlstr.c --- /tmp/T0EWa4EK Mon Jul 8 09:40:53 2002 +++ rtlstr.c Mon Jun 24 15:28:31 2002 @@ -84,7 +84,7 @@ */ void WINAPI RtlInitString( PSTRING target, LPCSTR source ) { - return RtlInitAnsiString( target, source ); + RtlInitAnsiString( target, source ); } Index: dlls/shell32/shellpath.c =================================================================== RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/shell32/shellpath.c,v retrieving revision 1.1 diff -u -r1.1 shellpath.c --- /tmp/T0k1aqFK Mon Jul 8 09:40:53 2002 +++ shellpath.c Mon Jul 8 09:38:07 2002 @@ -183,8 +183,9 @@ void WINAPI PathStripPathAW(LPVOID lpszPath) { if (SHELL_OsIsUnicode()) - return PathStripPathW(lpszPath); - return PathStripPathA(lpszPath); + PathStripPathW(lpszPath); + else + PathStripPathA(lpszPath); } /************************************************************************* @@ -204,7 +205,8 @@ { if (SHELL_OsIsUnicode()) PathRemoveArgsW(lpszPath); - PathRemoveArgsA(lpszPath); + else + PathRemoveArgsA(lpszPath); } /************************************************************************* @@ -213,8 +215,9 @@ void WINAPI PathRemoveExtensionAW(LPVOID lpszPath) { if (SHELL_OsIsUnicode()) - return PathRemoveExtensionW(lpszPath); - return PathRemoveExtensionA(lpszPath); + PathRemoveExtensionW(lpszPath); + else + PathRemoveExtensionA(lpszPath); } @@ -257,7 +260,8 @@ { if(SHELL_OsIsUnicode()) PathRemoveBlanksW(str); - PathRemoveBlanksA(str); + else + PathRemoveBlanksA(str); } /************************************************************************* @@ -266,8 +270,9 @@ VOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath) { if(SHELL_OsIsUnicode()) - return PathQuoteSpacesW(lpszPath); - return PathQuoteSpacesA(lpszPath); + PathQuoteSpacesW(lpszPath); + else + PathQuoteSpacesA(lpszPath); } /************************************************************************* @@ -636,8 +641,9 @@ */ VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath) { if (SHELL_OsIsUnicode()) - return PathSetDlgItemPathW(hDlg, id, pszPath); - return PathSetDlgItemPathA(hDlg, id, pszPath); + PathSetDlgItemPathW(hDlg, id, pszPath); + else + PathSetDlgItemPathA(hDlg, id, pszPath); } Index: dlls/user/wnd16.c =================================================================== RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/user/wnd16.c,v retrieving revision 1.1 diff -u -r1.1 wnd16.c --- /tmp/T0Q6aOFK Mon Jul 8 09:40:54 2002 +++ wnd16.c Mon Jun 24 16:34:25 2002 @@ -1461,7 +1461,7 @@ */ void WINAPI CalcChildScroll16( HWND16 hwnd, WORD scroll ) { - return CalcChildScroll( WIN_Handle32(hwnd), scroll ); + CalcChildScroll( WIN_Handle32(hwnd), scroll ); }