Author: tkreuzer Date: Sat May 31 16:58:03 2014 New Revision: 63518
URL: http://svn.reactos.org/svn/reactos?rev=63518&view=rev Log: [SETUP16/EXPLORER/LIBTIFF/DESK/ADVAPI32/MCIWAVE/SAMSRV/SHELL32/WINMM/LIBMPG123] Fix / silence warnings
Modified: trunk/reactos/base/applications/setup16/main.c trunk/reactos/base/shell/explorer/shell/shellfs.cpp trunk/reactos/base/shell/explorer/taskbar/quicklaunch.cpp trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt trunk/reactos/dll/cpl/desk/screensaver.c trunk/reactos/dll/win32/advapi32/misc/shutdown.c trunk/reactos/dll/win32/mciwave/mciwave.c trunk/reactos/dll/win32/samsrv/samrpc.c trunk/reactos/dll/win32/shell32/desktop.cpp trunk/reactos/dll/win32/shell32/shlexec.cpp trunk/reactos/dll/win32/winmm/CMakeLists.txt trunk/reactos/lib/3rdparty/libmpg123/CMakeLists.txt
Modified: trunk/reactos/base/applications/setup16/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/setup16/m... ============================================================================== --- trunk/reactos/base/applications/setup16/main.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/setup16/main.c [iso-8859-1] Sat May 31 16:58:03 2014 @@ -12,6 +12,8 @@ { FILE_IN_CABINET_INFO_W *pInfo; FILEPATHS_W *pFilePaths; + + DBG_UNREFERENCED_LOCAL_VARIABLE(pFilePaths);
switch(Notification) { @@ -31,7 +33,7 @@ { SHFILEOPSTRUCT fileop; DWORD len = wcslen(lpszDir); - WCHAR *pszFrom = HeapAlloc(GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR)); + WCHAR *pszFrom = HeapAlloc(GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR)); int ret;
wcscpy(pszFrom, lpszDir); @@ -80,26 +82,26 @@ STARTUPINFO startupInfo; UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(nCmdShow); - + GetCurrentDirectory(MAX_PATH, szSetupPath); wcscat(szSetupPath, L"\"); wcscpy(szFileName, szSetupPath); wcscat(szFileName, L"setup.lst"); - + if (GetFileAttributes(szFileName) == INVALID_FILE_ATTRIBUTES) { MessageBoxW(0, L"Cannot find Setup.lst file", L"Error", MB_OK | MB_ICONERROR); return 1; } - + /* read information from setup.lst */ GetPrivateProfileStringW(NT_PARAMS, L"CabinetFile", NULL, szCabFileName, MAX_PATH, szFileName); GetPrivateProfileStringW(NT_PARAMS, L"TmpDirName", NULL, szTempDirName, 50, szFileName); GetPrivateProfileStringW(NT_PARAMS, L"CmdLine", NULL, szCmdLine, MAX_PATH, szFileName); - + wcscpy(szCabFilePath, szSetupPath); wcscat(szCabFilePath, szCabFileName); - + /* ceate temp directory */ GetSystemDrive(szDrive); wcscpy(szTempPath, szDrive); @@ -107,16 +109,16 @@ wcscpy(szFullTempPath, szTempPath); wcscat(szFullTempPath, szTempDirName); wcscat(szFullTempPath, L"\"); - + if (SHCreateDirectoryEx(0, szFullTempPath, NULL) != ERROR_SUCCESS) { MessageBoxW(0, L"Could not create Temp Directory.", L"Error", MB_OK | MB_ICONERROR); return 1; - } + }
dwAttrib = GetFileAttributes(szTempPath); SetFileAttributes(szTempPath, dwAttrib | FILE_ATTRIBUTE_HIDDEN); - + /* extract files */ if (!SetupIterateCabinetW(szCabFilePath, 0, ExtCabCallback, szFullTempPath)) { @@ -124,12 +126,12 @@ DeleteDirectory(szTempPath); return 1; } - + /* prepare command line */ wsprintf(szTempCmdLine, szCmdLine, szFullTempPath, lpCmdLine); wcscpy(szCmdLine, szFullTempPath); wcscat(szCmdLine, szTempCmdLine); - + /* execute the 32-Bit installer */ ZeroMemory(&processInfo, sizeof(processInfo)); ZeroMemory(&startupInfo, sizeof(startupInfo)); @@ -148,10 +150,10 @@ DeleteDirectory(szTempPath); return 1; } - + /* cleanup */ DeleteDirectory(szTempPath); - + return 0; }
Modified: trunk/reactos/base/shell/explorer/shell/shellfs.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/s... ============================================================================== --- trunk/reactos/base/shell/explorer/shell/shellfs.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/shell/shellfs.cpp [iso-8859-1] Sat May 31 16:58:03 2014 @@ -40,7 +40,7 @@ IDataObject* pDataObj;
STGMEDIUM medium = {0, {0}, 0}; - FORMATETC fmt = {g_Globals._cfStrFName, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL}; + FORMATETC fmt = {(USHORT)g_Globals._cfStrFName, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
HRESULT hr = _folder->GetUIObjectOf(0, 1, &pidl, IID_IDataObject, 0, (LPVOID*)&pDataObj);
Modified: trunk/reactos/base/shell/explorer/taskbar/quicklaunch.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskbar... ============================================================================== --- trunk/reactos/base/shell/explorer/taskbar/quicklaunch.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/taskbar/quicklaunch.cpp [iso-8859-1] Sat May 31 16:58:03 2014 @@ -184,7 +184,7 @@
_entries[id] = qle;
- TBBUTTON btn = {0, 0, flags, BTNS_BUTTON|BTNS_NOPREFIX, {0, 0}, 0, 0}; + TBBUTTON btn = {0, 0, (BYTE)flags, BTNS_BUTTON|BTNS_NOPREFIX, {0, 0}, 0, 0};
btn.idCommand = id; btn.iBitmap = bmp_idx; @@ -195,7 +195,7 @@ void QuickLaunchBar::UpdateDesktopButtons(int desktop_idx) { for(int i=0; i<DESKTOP_COUNT; ++i) { - TBBUTTONINFO tbi = {sizeof(TBBUTTONINFO), TBIF_STATE, 0, 0, desktop_idx==i? TBSTATE_ENABLED|TBSTATE_PRESSED: TBSTATE_ENABLED}; + TBBUTTONINFO tbi = {sizeof(TBBUTTONINFO), TBIF_STATE, 0, 0, (BYTE)(desktop_idx==i? TBSTATE_ENABLED|TBSTATE_PRESSED: TBSTATE_ENABLED)};
SendMessage(_hwnd, TB_SETBUTTONINFO, ID_SWITCH_DESKTOP_1+i, (LPARAM)&tbi); }
Modified: trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libtiff/CMakeL... ============================================================================== --- trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt [iso-8859-1] Sat May 31 16:58:03 2014 @@ -61,4 +61,5 @@
if(NOT MSVC) allow_warnings(libtiff) + add_target_compile_flags(libtiff "-Wno-unused-but-set-variable") endif()
Modified: trunk/reactos/dll/cpl/desk/screensaver.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/screensaver.c?... ============================================================================== --- trunk/reactos/dll/cpl/desk/screensaver.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/screensaver.c [iso-8859-1] Sat May 31 16:58:03 2014 @@ -504,6 +504,8 @@ HKEY regKey; BOOL DeleteMode = FALSE;
+ DBG_UNREFERENCED_LOCAL_VARIABLE(DeleteMode); + if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Control Panel\Desktop"), 0,
Modified: trunk/reactos/dll/win32/advapi32/misc/shutdown.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/misc/shu... ============================================================================== --- trunk/reactos/dll/win32/advapi32/misc/shutdown.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/misc/shutdown.c [iso-8859-1] Sat May 31 16:58:03 2014 @@ -117,6 +117,8 @@ NTSTATUS Status; ULONG Timeout_ms;
+ DBG_UNREFERENCED_LOCAL_VARIABLE(Timeout_ms); + /* Convert to milliseconds so we can use the value later on */ Timeout_ms = dwTimeout * 1000;
@@ -217,7 +219,7 @@
/****************************************************************************** * InitiateShutdownW [ADVAPI32.@] - * + * * @unimplamented */ DWORD WINAPI @@ -233,7 +235,7 @@
/****************************************************************************** * InitiateShutdownA [ADVAPI32.@] - * + * * see InitiateShutdownW */ DWORD WINAPI
Modified: trunk/reactos/dll/win32/mciwave/mciwave.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciwave/mciwave.c... ============================================================================== --- trunk/reactos/dll/win32/mciwave/mciwave.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciwave/mciwave.c [iso-8859-1] Sat May 31 16:58:03 2014 @@ -535,7 +535,7 @@
wmw->nUseCount++;
- wmw->wInput = wmw->wOutput = WAVE_MAPPER; + wmw->wInput = wmw->wOutput = (WORD)WAVE_MAPPER; wmw->fInput = FALSE; wmw->hWave = 0; wmw->dwStatus = MCI_MODE_NOT_READY; @@ -1371,13 +1371,13 @@ TRACE("MCI_WAVE_SET_ANYINPUT\n"); if (wmw->wInput != (WORD)lpParms->wInput) WAVE_mciStop(wDevID, MCI_WAIT, NULL); - wmw->wInput = WAVE_MAPPER; + wmw->wInput = (WORD)WAVE_MAPPER; } if (dwFlags & MCI_WAVE_SET_ANYOUTPUT) { TRACE("MCI_WAVE_SET_ANYOUTPUT\n"); if (wmw->wOutput != (WORD)lpParms->wOutput) WAVE_mciStop(wDevID, MCI_WAIT, NULL); - wmw->wOutput = WAVE_MAPPER; + wmw->wOutput = (WORD)WAVE_MAPPER; } /* Set wave format parameters is refused after Open or Record.*/ if (dwFlags & MCI_WAVE_SET_FORMATTAG) {
Modified: trunk/reactos/dll/win32/samsrv/samrpc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?r... ============================================================================== --- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Sat May 31 16:58:03 2014 @@ -8062,6 +8062,10 @@ LARGE_INTEGER SystemTime; NTSTATUS Status;
+ DBG_UNREFERENCED_LOCAL_VARIABLE(StoredLmPresent); + DBG_UNREFERENCED_LOCAL_VARIABLE(StoredNtPresent); + DBG_UNREFERENCED_LOCAL_VARIABLE(StoredLmEmpty); + TRACE("(%p %u %p %p %u %p %p %u %p %u %p)\n", UserHandle, LmPresent, OldLmEncryptedWithNewLm, NewLmEncryptedWithOldLm, NtPresent, OldNtEncryptedWithNewNt, NewNtEncryptedWithOldNt, NtCrossEncryptionPresent,
Modified: trunk/reactos/dll/win32/shell32/desktop.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/desktop.c... ============================================================================== --- trunk/reactos/dll/win32/shell32/desktop.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/desktop.cpp [iso-8859-1] Sat May 31 16:58:03 2014 @@ -261,8 +261,8 @@
HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags) { - /* - * We should use IShellWindows interface here in order to attempt to + /* + * We should use IShellWindows interface here in order to attempt to * find an open shell window that shows the requested pidl and activate it */
@@ -422,6 +422,7 @@ rcDesktop.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN);
/* FIXME: Update work area */ + DBG_UNREFERENCED_LOCAL_VARIABLE(rcDesktop); } break;
Modified: trunk/reactos/dll/win32/shell32/shlexec.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlexec.c... ============================================================================== --- trunk/reactos/dll/win32/shell32/shlexec.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlexec.cpp [iso-8859-1] Sat May 31 16:58:03 2014 @@ -460,7 +460,7 @@ startup.wShowWindow = psei->nShow; dwCreationFlags = CREATE_UNICODE_ENVIRONMENT; if (!(psei->fMask & SEE_MASK_NO_CONSOLE)) - dwCreationFlags |= CREATE_NEW_CONSOLE; + dwCreationFlags |= CREATE_NEW_CONSOLE; startup.lpTitle = (LPWSTR)(psei->fMask & (SEE_MASK_HASLINKNAME | SEE_MASK_HASTITLE) ? psei->lpClass : NULL);
if (psei->fMask & SEE_MASK_HASLINKNAME) @@ -733,7 +733,7 @@ lpFile = xlpFile; /* The file was found in one of the directories in the system-wide search path */ } - + attribs = GetFileAttributesW(lpFile); if (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY)) { @@ -994,7 +994,7 @@ assert(ptr); *ptr = 0; } - + static const WCHAR wTopic[] = L"\topic"; if (strlenW(wTopic) + 1 > endkeyLen) { @@ -1491,7 +1491,7 @@ DWORD resultLen; BOOL done; UINT_PTR rslt; - + /* FIXME: remove following block when SHELL_quote_and_execute supports hkeyClass parameter */ if (cmask != SEE_MASK_CLASSNAME) { @@ -1522,7 +1522,7 @@ ERR("Argify buffer not large enough... truncating\n"); return execfunc(wcmd, NULL, FALSE, psei, psei_out); } - + strcpyW(classname, psei->lpClass); rslt = SHELL_FindExecutableByVerb(psei->lpVerb, NULL, classname, execCmd, sizeof(execCmd));
@@ -1835,6 +1835,7 @@ Info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_EXEC;
//if (SHOpenWithDialog(sei_tmp.hwnd, &Info) != S_OK) + DBG_UNREFERENCED_LOCAL_VARIABLE(Info); do_error_dialog(retval, sei_tmp.hwnd, wszApplicationName); } HeapFree(GetProcessHeap(), 0, wszApplicationName); @@ -2070,6 +2071,7 @@ Info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_EXEC;
//if (SHOpenWithDialog(sei_tmp.hwnd, &Info) != S_OK) + DBG_UNREFERENCED_LOCAL_VARIABLE(Info); do_error_dialog(retval, sei_tmp.hwnd, wszApplicationName); }
Modified: trunk/reactos/dll/win32/winmm/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/CMakeLists.... ============================================================================== --- trunk/reactos/dll/win32/winmm/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winmm/CMakeLists.txt [iso-8859-1] Sat May 31 16:58:03 2014 @@ -28,3 +28,7 @@ add_pch(winmm winemm.h SOURCE) add_subdirectory(midimap) add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all) + +if(NOT MSVC) + add_target_compile_flags(winmm "-Wno-unused-but-set-variable") +endif()
Modified: trunk/reactos/lib/3rdparty/libmpg123/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libmpg123/CMak... ============================================================================== --- trunk/reactos/lib/3rdparty/libmpg123/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/libmpg123/CMakeLists.txt [iso-8859-1] Sat May 31 16:58:03 2014 @@ -44,3 +44,7 @@ add_library(libmpg123 ${SOURCE}) add_dependencies(libmpg123 psdk) add_pch(libmpg123 precomp.h SOURCE) + +if(NOT MSVC) + add_target_compile_flags(libmpg123 "-Wno-unused-but-set-variable") +endif()