From 4e616754a54d4e5897996a59a81fb45ccd1e3784 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 10 Sep 2011 23:54:02 +0000 Subject: [PATCH] * Fix some more unused but set variables. * Allow warnings for some 3rd party code. svn path=/trunk/; revision=53680 --- reactos/base/system/smss/smapi.c | 4 - reactos/dll/cpl/desk/draw.c | 5 - reactos/dll/directx/dmusic/port.c | 3 +- reactos/dll/directx/ksproxy/ksproxy.cpp | 2 - reactos/dll/win32/devmgr/advprop.c | 3 - reactos/dll/win32/dhcpcsvc/dhcp/pipe.c | 16 +-- reactos/dll/win32/glu32/CMakeLists.txt | 2 +- reactos/dll/win32/msafd/misc/dllmain.c | 41 +++--- reactos/dll/win32/msafd/misc/helpers.c | 9 +- reactos/dll/win32/msafd/misc/sndrcv.c | 11 +- reactos/dll/win32/netcfgx/netcfg_iface.c | 2 - reactos/dll/win32/netcfgx/tcpipconf_notify.c | 14 +-- reactos/dll/win32/spoolss/CMakeLists.txt | 5 +- reactos/dll/win32/ws2_32_new/src/async.c | 3 +- reactos/dll/win32/ws2_32_new/src/enumprot.c | 3 +- reactos/dll/win32/ws2_32_new/src/nscatent.c | 119 +++++++++--------- reactos/dll/win32/ws2_32_new/src/nsprovid.c | 23 ++-- .../drivers/wdm/audio/filters/kmixer/filter.c | 4 - reactos/drivers/wdm/audio/sysaudio/control.c | 4 - reactos/drivers/wdm/audio/sysaudio/deviface.c | 3 - reactos/lib/drivers/ip/network/icmp.c | 16 ++- reactos/lib/drivers/ip/network/router.c | 3 +- reactos/lib/drivers/ip/transport/tcp/tcp.c | 12 +- reactos/lib/drivers/sound/mmixer/midi.c | 5 +- reactos/lib/drivers/sound/mmixer/topology.c | 4 - reactos/lib/fslib/vfatlib/fat32.c | 4 - reactos/lib/fslib/vfatlib/vfatlib.c | 8 +- 27 files changed, 137 insertions(+), 191 deletions(-) diff --git a/reactos/base/system/smss/smapi.c b/reactos/base/system/smss/smapi.c index 37abfc5c38b..669c8ed755b 100644 --- a/reactos/base/system/smss/smapi.c +++ b/reactos/base/system/smss/smapi.c @@ -189,8 +189,6 @@ SmpHandleConnectionRequest (PSM_PORT_MESSAGE Request) PSM_CLIENT_DATA ClientData = NULL; HANDLE hClientDataApiPort = (HANDLE) 0; PHANDLE ClientDataApiPort = & hClientDataApiPort; - HANDLE hClientDataApiPortThread = (HANDLE) 0; - PHANDLE ClientDataApiPortThread = & hClientDataApiPortThread; PVOID Context = NULL; DPRINT("SM: %s called:\n SubSystemID=%d\n SbName=\"%S\"\n", @@ -207,7 +205,6 @@ SmpHandleConnectionRequest (PSM_PORT_MESSAGE Request) */ DPRINT("SM: %s: simple request\n", __FUNCTION__); ClientDataApiPort = & hClientDataApiPort; - ClientDataApiPortThread = & hClientDataApiPortThread; Accept = TRUE; } else { DPRINT("SM: %s: request to register an image set\n", __FUNCTION__); @@ -232,7 +229,6 @@ SmpHandleConnectionRequest (PSM_PORT_MESSAGE Request) * willing to manage a free image type. */ ClientDataApiPort = & ClientData->ApiPort; - ClientDataApiPortThread = & ClientData->ApiPortThread; /* * Call back the candidate environment subsystem * server (use the port name sent in in the diff --git a/reactos/dll/cpl/desk/draw.c b/reactos/dll/cpl/desk/draw.c index 3a4b8c22d57..8a6bf5d5ec2 100644 --- a/reactos/dll/cpl/desk/draw.c +++ b/reactos/dll/cpl/desk/draw.c @@ -437,15 +437,10 @@ MyDrawScrollbar(HDC hdc, LPRECT rc, HBRUSH hbrScrollbar, THEME *theme) BOOL MyDrawCaptionTemp(HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont, HICON hIcon, LPCWSTR str, UINT uFlags, THEME *theme) { - ULONG Height; - UINT VCenter; HBRUSH hbr; HGDIOBJ hFontOld; RECT rc; - Height = theme->Size[SIZE_CAPTION_Y] - 1; - VCenter = (rect->bottom - rect->top) / 2; - if (uFlags & DC_GRADIENT) { GRADIENT_RECT gcap = {0, 1}; diff --git a/reactos/dll/directx/dmusic/port.c b/reactos/dll/directx/dmusic/port.c index 5c4e848625e..c6281a47ca7 100644 --- a/reactos/dll/directx/dmusic/port.c +++ b/reactos/dll/directx/dmusic/port.c @@ -362,7 +362,6 @@ static const IDirectMusicThruVtbl DirectMusicThru_Vtbl = { HRESULT WINAPI DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter, LPDMUS_PORTPARAMS pPortParams, LPDMUS_PORTCAPS pPortCaps) { IDirectMusicPortImpl *obj; - HRESULT hr = E_FAIL; TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter); @@ -380,7 +379,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj, obj->caps = *pPortCaps; obj->pDirectSound = NULL; obj->pLatencyClock = NULL; - hr = DMUSIC_CreateReferenceClockImpl(&IID_IReferenceClock, (LPVOID*)&obj->pLatencyClock, NULL); + DMUSIC_CreateReferenceClockImpl(&IID_IReferenceClock, (LPVOID*)&obj->pLatencyClock, NULL); #if 0 if (pPortParams->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) { diff --git a/reactos/dll/directx/ksproxy/ksproxy.cpp b/reactos/dll/directx/ksproxy/ksproxy.cpp index 7baa7e30496..20c21779e18 100644 --- a/reactos/dll/directx/ksproxy/ksproxy.cpp +++ b/reactos/dll/directx/ksproxy/ksproxy.cpp @@ -111,7 +111,6 @@ KsOpenDefaultDevice( PHANDLE DeviceHandle) { HDEVINFO hList; - SP_DEVINFO_DATA DeviceInfoData; SP_DEVICE_INTERFACE_DATA DeviceInterfaceData; PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData; WCHAR Path[MAX_PATH+sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W)]; @@ -126,7 +125,6 @@ KsOpenDefaultDevice( } /* setup parameters */ - DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA); if (SetupDiEnumDeviceInterfaces(hList, NULL, &Category, 0, &DeviceInterfaceData)) diff --git a/reactos/dll/win32/devmgr/advprop.c b/reactos/dll/win32/devmgr/advprop.c index 3fe16f24634..4b802a4fdd0 100644 --- a/reactos/dll/win32/devmgr/advprop.c +++ b/reactos/dll/win32/devmgr/advprop.c @@ -957,7 +957,6 @@ static VOID DisplayDevNodeEnumerator(IN PDEVADVPROP_INFO dap, IN HWND hwndListView) { - HDEVINFO DeviceInfoSet; PSP_DEVINFO_DATA DeviceInfoData; DWORD dwType = 0; @@ -966,12 +965,10 @@ DisplayDevNodeEnumerator(IN PDEVADVPROP_INFO dap, if (dap->CurrentDeviceInfoSet != INVALID_HANDLE_VALUE) { - DeviceInfoSet = dap->CurrentDeviceInfoSet; DeviceInfoData = &dap->CurrentDeviceInfoData; } else { - DeviceInfoSet = dap->DeviceInfoSet; DeviceInfoData = &dap->DeviceInfoData; } diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/pipe.c b/reactos/dll/win32/dhcpcsvc/dhcp/pipe.c index 9ea0402c413..d9ac7db6298 100644 --- a/reactos/dll/win32/dhcpcsvc/dhcp/pipe.c +++ b/reactos/dll/win32/dhcpcsvc/dhcp/pipe.c @@ -31,7 +31,7 @@ DWORD PipeSend( COMM_DHCP_REPLY *Reply ) { } DWORD WINAPI PipeThreadProc( LPVOID Parameter ) { - DWORD BytesRead, BytesWritten; + DWORD BytesRead; COMM_DHCP_REQ Req; COMM_DHCP_REPLY Reply; BOOL Result, Connected; @@ -51,34 +51,34 @@ DWORD WINAPI PipeThreadProc( LPVOID Parameter ) { if( Result ) { switch( Req.Type ) { case DhcpReqQueryHWInfo: - BytesWritten = DSQueryHWInfo( PipeSend, &Req ); + DSQueryHWInfo( PipeSend, &Req ); break; case DhcpReqLeaseIpAddress: - BytesWritten = DSLeaseIpAddress( PipeSend, &Req ); + DSLeaseIpAddress( PipeSend, &Req ); break; case DhcpReqReleaseIpAddress: - BytesWritten = DSReleaseIpAddressLease( PipeSend, &Req ); + DSReleaseIpAddressLease( PipeSend, &Req ); break; case DhcpReqRenewIpAddress: - BytesWritten = DSRenewIpAddressLease( PipeSend, &Req ); + DSRenewIpAddressLease( PipeSend, &Req ); break; case DhcpReqStaticRefreshParams: - BytesWritten = DSStaticRefreshParams( PipeSend, &Req ); + DSStaticRefreshParams( PipeSend, &Req ); break; case DhcpReqGetAdapterInfo: - BytesWritten = DSGetAdapterInfo( PipeSend, &Req ); + DSGetAdapterInfo( PipeSend, &Req ); break; default: DPRINT1("Unrecognized request type %d\n", Req.Type); ZeroMemory( &Reply, sizeof( COMM_DHCP_REPLY ) ); Reply.Reply = 0; - BytesWritten = PipeSend( &Reply ); + PipeSend( &Reply ); break; } } diff --git a/reactos/dll/win32/glu32/CMakeLists.txt b/reactos/dll/win32/glu32/CMakeLists.txt index 0a7077b6ddc..4454707363c 100644 --- a/reactos/dll/win32/glu32/CMakeLists.txt +++ b/reactos/dll/win32/glu32/CMakeLists.txt @@ -107,7 +107,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/glu32.def) add_library(glu32 SHARED ${SOURCE}) - +allow_warnings(glu32) set_module_type(glu32 win32dll ENTRYPOINT 0 ) if(NOT MSVC) diff --git a/reactos/dll/win32/msafd/misc/dllmain.c b/reactos/dll/win32/msafd/misc/dllmain.c index 9cd2d384c78..1963bc7ad69 100644 --- a/reactos/dll/win32/msafd/misc/dllmain.c +++ b/reactos/dll/win32/msafd/misc/dllmain.c @@ -2598,7 +2598,6 @@ BOOLEAN SockGetAsyncSelectHelperAfdHandle(VOID) UNICODE_STRING AfdHelper; OBJECT_ATTRIBUTES ObjectAttributes; IO_STATUS_BLOCK IoSb; - NTSTATUS Status; FILE_COMPLETION_INFORMATION CompletionInfo; OBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleFlags; @@ -2617,17 +2616,17 @@ BOOLEAN SockGetAsyncSelectHelperAfdHandle(VOID) NULL); /* Open the Handle to AFD */ - Status = NtCreateFile(&SockAsyncHelperAfdHandle, - GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, - &ObjectAttributes, - &IoSb, - NULL, - 0, - FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_OPEN_IF, - 0, - NULL, - 0); + NtCreateFile(&SockAsyncHelperAfdHandle, + GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, + &ObjectAttributes, + &IoSb, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN_IF, + 0, + NULL, + 0); /* * Now Set up the Completion Port Information @@ -2635,20 +2634,20 @@ BOOLEAN SockGetAsyncSelectHelperAfdHandle(VOID) */ CompletionInfo.Port = SockAsyncCompletionPort; CompletionInfo.Key = SockAsyncSelectCompletionRoutine; - Status = NtSetInformationFile(SockAsyncHelperAfdHandle, - &IoSb, - &CompletionInfo, - sizeof(CompletionInfo), - FileCompletionInformation); + NtSetInformationFile(SockAsyncHelperAfdHandle, + &IoSb, + &CompletionInfo, + sizeof(CompletionInfo), + FileCompletionInformation); /* Protect the Handle */ HandleFlags.ProtectFromClose = TRUE; HandleFlags.Inherit = FALSE; - Status = NtSetInformationObject(SockAsyncCompletionPort, - ObjectHandleFlagInformation, - &HandleFlags, - sizeof(HandleFlags)); + NtSetInformationObject(SockAsyncCompletionPort, + ObjectHandleFlagInformation, + &HandleFlags, + sizeof(HandleFlags)); /* Set this variable to true so that Send/Recv/Accept will know wether to renable disabled events */ diff --git a/reactos/dll/win32/msafd/misc/helpers.c b/reactos/dll/win32/msafd/misc/helpers.c index 3ec0f97b3dd..7bc78e36609 100644 --- a/reactos/dll/win32/msafd/misc/helpers.c +++ b/reactos/dll/win32/msafd/misc/helpers.c @@ -296,10 +296,9 @@ SockLoadHelperDll( PWINSOCK_MAPPING Mapping, PHELPER_DATA *HelperDllData) { - PHELPER_DATA HelperData; + PHELPER_DATA HelperData; PWSTR HelperDllName; PWSTR FullHelperDllName; - ULONG HelperDllNameSize; PWSTR HelperKey; HKEY KeyHandle; ULONG DataSize; @@ -412,9 +411,9 @@ SockLoadHelperDll( } /* Get the Full name, expanding Environment Strings */ - HelperDllNameSize = ExpandEnvironmentStringsW (HelperDllName, - FullHelperDllName, - 256); + ExpandEnvironmentStringsW (HelperDllName, + FullHelperDllName, + 256); /* Load the DLL */ HelperData->hInstance = LoadLibraryW(FullHelperDllName); diff --git a/reactos/dll/win32/msafd/misc/sndrcv.c b/reactos/dll/win32/msafd/misc/sndrcv.c index efea9afedf4..589fefcc55d 100644 --- a/reactos/dll/win32/msafd/misc/sndrcv.c +++ b/reactos/dll/win32/msafd/misc/sndrcv.c @@ -22,7 +22,6 @@ WSPAsyncSelect(IN SOCKET Handle, { PSOCKET_INFORMATION Socket = NULL; PASYNC_DATA AsyncData; - NTSTATUS Status; BOOLEAN BlockMode; /* Get the Socket Structure associated to this Socket */ @@ -81,11 +80,11 @@ WSPAsyncSelect(IN SOCKET Handle, AsyncData->SequenceNumber = Socket->SharedData.SequenceNumber; /* Begin Async Select by using I/O Completion */ - Status = NtSetIoCompletion(SockAsyncCompletionPort, - (PVOID)&SockProcessQueuedAsyncSelect, - AsyncData, - 0, - 0); + NtSetIoCompletion(SockAsyncCompletionPort, + (PVOID)&SockProcessQueuedAsyncSelect, + AsyncData, + 0, + 0); /* Return */ return ERROR_SUCCESS; diff --git a/reactos/dll/win32/netcfgx/netcfg_iface.c b/reactos/dll/win32/netcfgx/netcfg_iface.c index 7f566e458bd..c0f96476fd8 100644 --- a/reactos/dll/win32/netcfgx/netcfg_iface.c +++ b/reactos/dll/win32/netcfgx/netcfg_iface.c @@ -170,7 +170,6 @@ EnumClientServiceProtocol(HKEY hKey, const GUID * pGuid, NetCfgComponentItem ** DWORD dwIndex = 0; DWORD dwSize; DWORD dwType; - DWORD dwCharacteristics; WCHAR szName[100]; WCHAR szText[100]; HKEY hSubKey, hNDIKey; @@ -179,7 +178,6 @@ EnumClientServiceProtocol(HKEY hKey, const GUID * pGuid, NetCfgComponentItem ** *pHead = NULL; do { - dwCharacteristics = 0; szText[0] = L'\0'; dwSize = sizeof(szName)/sizeof(WCHAR); diff --git a/reactos/dll/win32/netcfgx/tcpipconf_notify.c b/reactos/dll/win32/netcfgx/tcpipconf_notify.c index db8ec1b9bc8..a71d0de9181 100644 --- a/reactos/dll/win32/netcfgx/tcpipconf_notify.c +++ b/reactos/dll/win32/netcfgx/tcpipconf_notify.c @@ -564,7 +564,6 @@ TcpipAdvancedOptDlg( { TcpipConfNotifyImpl * This; LPPROPSHEETPAGE page; - int res; switch(uMsg) { @@ -576,11 +575,11 @@ TcpipAdvancedOptDlg( case WM_COMMAND: if (LOWORD(wParam) == IDC_OPTPROP) { - res = DialogBoxParamW(netcfgx_hInstance, - MAKEINTRESOURCEW(IDD_TCPIP_FILTER_DLG), - GetParent(hwndDlg), - TcpipFilterSettingsDlg, - (LPARAM)GetWindowLongPtr(hwndDlg, DWLP_USER)); + DialogBoxParamW(netcfgx_hInstance, + MAKEINTRESOURCEW(IDD_TCPIP_FILTER_DLG), + GetParent(hwndDlg), + TcpipFilterSettingsDlg, + (LPARAM)GetWindowLongPtr(hwndDlg, DWLP_USER)); break; } } @@ -2359,15 +2358,12 @@ CopyIpAddrString( COPY_TYPE Type, LPWSTR szMetric) { - LPWSTR szItem; IP_ADDR_STRING * pCurrent; IP_ADDR *pNew, *pLast; pCurrent = pSrc; pLast = NULL; - szItem = szMetric; - while(pCurrent) { pNew = CoTaskMemAlloc(sizeof(IP_ADDR)); diff --git a/reactos/dll/win32/spoolss/CMakeLists.txt b/reactos/dll/win32/spoolss/CMakeLists.txt index 771a63e5f36..eede3e7b325 100644 --- a/reactos/dll/win32/spoolss/CMakeLists.txt +++ b/reactos/dll/win32/spoolss/CMakeLists.txt @@ -11,12 +11,9 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/spoolss.def) add_library(spoolss SHARED ${SOURCE}) - +allow_warnings(spoolss) set_module_type(spoolss win32dll) - target_link_libraries(spoolss wine) - add_importlibs(spoolss winspool msvcrt kernel32 ntdll) add_importlib_target(spoolss.spec) - add_cd_file(TARGET spoolss DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/win32/ws2_32_new/src/async.c b/reactos/dll/win32/ws2_32_new/src/async.c index 8401c077d97..eda3cd5c3f6 100644 --- a/reactos/dll/win32/ws2_32_new/src/async.c +++ b/reactos/dll/win32/ws2_32_new/src/async.c @@ -702,12 +702,11 @@ WsAsyncThread(IN PWSASYNCCONTEXT Context) { PWSASYNCBLOCK AsyncBlock; PLIST_ENTRY Entry; - FARPROC OldHook; HANDLE AsyncEvent = Context->AsyncEvent; PLIST_ENTRY ListHead = &Context->AsyncQueue; /* Set the blocking hook */ - OldHook = WSASetBlockingHook((FARPROC)WsAsyncThreadBlockingHook); + WSASetBlockingHook((FARPROC)WsAsyncThreadBlockingHook); /* Loop */ while (TRUE) diff --git a/reactos/dll/win32/ws2_32_new/src/enumprot.c b/reactos/dll/win32/ws2_32_new/src/enumprot.c index a4d18c9eb9f..f8814f907fe 100644 --- a/reactos/dll/win32/ws2_32_new/src/enumprot.c +++ b/reactos/dll/win32/ws2_32_new/src/enumprot.c @@ -103,7 +103,6 @@ PTCATALOG WSAAPI OpenInitializedCatalog(VOID) { - INT ErrorCode; PTCATALOG Catalog; HKEY WsKey; @@ -115,7 +114,7 @@ OpenInitializedCatalog(VOID) WsKey = WsOpenRegistryRoot(); /* Initialize the catalog */ - ErrorCode = WsTcInitializeFromRegistry(Catalog, WsKey, NULL); + WsTcInitializeFromRegistry(Catalog, WsKey, NULL); /* Close the key */ RegCloseKey(WsKey); diff --git a/reactos/dll/win32/ws2_32_new/src/nscatent.c b/reactos/dll/win32/ws2_32_new/src/nscatent.c index 13794a7440a..0d201a92169 100644 --- a/reactos/dll/win32/ws2_32_new/src/nscatent.c +++ b/reactos/dll/win32/ws2_32_new/src/nscatent.c @@ -67,7 +67,6 @@ WsNcEntryInitializeFromRegistry(IN PNSCATALOG_ENTRY CatalogEntry, { CHAR CatalogEntryName[13]; HKEY EntryKey; - LONG Return; ULONG RegType = REG_SZ; ULONG RegSize = MAX_PATH; @@ -75,90 +74,90 @@ WsNcEntryInitializeFromRegistry(IN PNSCATALOG_ENTRY CatalogEntry, sprintf(CatalogEntryName, "%0""12""i", (int)UniqueId); /* Open the Entry */ - Return = RegOpenKeyEx(ParentKey, - CatalogEntryName, - 0, - KEY_READ, - &EntryKey); + RegOpenKeyEx(ParentKey, + CatalogEntryName, + 0, + KEY_READ, + &EntryKey); /* Read the Library Path */ - Return = RegQueryValueExW(EntryKey, - L"LibraryPath", - 0, - &RegType, - (LPBYTE)&CatalogEntry->DllPath, - &RegSize); + RegQueryValueExW(EntryKey, + L"LibraryPath", + 0, + &RegType, + (LPBYTE)&CatalogEntry->DllPath, + &RegSize); /* Query Display String Size*/ - Return = RegQueryValueExW(EntryKey, - L"DisplayString", - 0, - NULL, - NULL, - &RegSize); + RegQueryValueExW(EntryKey, + L"DisplayString", + 0, + NULL, + NULL, + &RegSize); /* Allocate it */ CatalogEntry->ProviderName = (LPWSTR)HeapAlloc(WsSockHeap, 0, RegSize); /* Read it */ - Return = RegQueryValueExW(EntryKey, - L"DisplayString", - 0, - &RegType, - (LPBYTE)CatalogEntry->ProviderName, - &RegSize); + RegQueryValueExW(EntryKey, + L"DisplayString", + 0, + &RegType, + (LPBYTE)CatalogEntry->ProviderName, + &RegSize); /* Read the Provider Id */ RegType = REG_BINARY; RegSize = sizeof(GUID); - Return = RegQueryValueEx(EntryKey, - "ProviderId", - 0, - &RegType, - (LPBYTE)&CatalogEntry->ProviderId, - &RegSize); + RegQueryValueEx(EntryKey, + "ProviderId", + 0, + &RegType, + (LPBYTE)&CatalogEntry->ProviderId, + &RegSize); /* Read the Address Family */ RegType = REG_DWORD; RegSize = sizeof(DWORD); - Return = RegQueryValueEx(EntryKey, - "AddressFamily", - 0, - &RegType, - (LPBYTE)&CatalogEntry->AddressFamily, - &RegSize); + RegQueryValueEx(EntryKey, + "AddressFamily", + 0, + &RegType, + (LPBYTE)&CatalogEntry->AddressFamily, + &RegSize); /* Read the Namespace Id */ - Return = RegQueryValueEx(EntryKey, - "SupportedNamespace", - 0, - &RegType, - (LPBYTE)&CatalogEntry->NamespaceId, - &RegSize); + RegQueryValueEx(EntryKey, + "SupportedNamespace", + 0, + &RegType, + (LPBYTE)&CatalogEntry->NamespaceId, + &RegSize); /* Read the Enabled Flag */ - Return = RegQueryValueEx(EntryKey, - "Enabled", - 0, - &RegType, - (LPBYTE)&CatalogEntry->Enabled, - &RegSize); + RegQueryValueEx(EntryKey, + "Enabled", + 0, + &RegType, + (LPBYTE)&CatalogEntry->Enabled, + &RegSize); /* Read the Version */ - Return = RegQueryValueEx(EntryKey, - "Version", - 0, - &RegType, - (LPBYTE)&CatalogEntry->Version, - &RegSize); + RegQueryValueEx(EntryKey, + "Version", + 0, + &RegType, + (LPBYTE)&CatalogEntry->Version, + &RegSize); /* Read the Support Service Class Info Flag */ - Return = RegQueryValueEx(EntryKey, - "Version", - 0, - &RegType, - (LPBYTE)&CatalogEntry->StoresServiceClassInfo, - &RegSize); + RegQueryValueEx(EntryKey, + "Version", + 0, + &RegType, + (LPBYTE)&CatalogEntry->StoresServiceClassInfo, + &RegSize); /* Done */ RegCloseKey(EntryKey); diff --git a/reactos/dll/win32/ws2_32_new/src/nsprovid.c b/reactos/dll/win32/ws2_32_new/src/nsprovid.c index b1c8673098e..5b1196d2493 100644 --- a/reactos/dll/win32/ws2_32_new/src/nsprovid.c +++ b/reactos/dll/win32/ws2_32_new/src/nsprovid.c @@ -80,25 +80,24 @@ WsNpInitialize(IN PNS_PROVIDER Provider, IN LPWSTR DllName, IN LPGUID ProviderId) { - DWORD ExpandedPathLength, PathLength; INT ErrorCode = ERROR_SUCCESS; LPNSPSTARTUP NSPStartupProc; CHAR AnsiPath[MAX_PATH], ExpandedDllPath[MAX_PATH]; /* Convert the path to ANSI */ - PathLength = WideCharToMultiByte(CP_ACP, - 0, - DllName, - -1, - AnsiPath, - MAX_PATH, - NULL, - NULL); + WideCharToMultiByte(CP_ACP, + 0, + DllName, + -1, + AnsiPath, + MAX_PATH, + NULL, + NULL); /* Expand the DLL Path */ - ExpandedPathLength = ExpandEnvironmentStringsA(AnsiPath, - ExpandedDllPath, - MAX_PATH); + ExpandEnvironmentStringsA(AnsiPath, + ExpandedDllPath, + MAX_PATH); /* Load the DLL */ Provider->DllHandle = LoadLibraryA(ExpandedDllPath); diff --git a/reactos/drivers/wdm/audio/filters/kmixer/filter.c b/reactos/drivers/wdm/audio/filters/kmixer/filter.c index 3d3c9f462a1..2333c000826 100644 --- a/reactos/drivers/wdm/audio/filters/kmixer/filter.c +++ b/reactos/drivers/wdm/audio/filters/kmixer/filter.c @@ -14,10 +14,6 @@ Dispatch_fnDeviceIoControl( PDEVICE_OBJECT DeviceObject, PIRP Irp) { - PIO_STACK_LOCATION IoStack; - - IoStack = IoGetCurrentIrpStackLocation(Irp); - UNIMPLEMENTED Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; diff --git a/reactos/drivers/wdm/audio/sysaudio/control.c b/reactos/drivers/wdm/audio/sysaudio/control.c index 459065ac8b1..65593434d0d 100644 --- a/reactos/drivers/wdm/audio/sysaudio/control.c +++ b/reactos/drivers/wdm/audio/sysaudio/control.c @@ -296,14 +296,10 @@ SysAudioHandleProperty( PKSAUDIO_DEVICE_ENTRY Entry; PSYSAUDIO_INSTANCE_INFO InstanceInfo; ULONG BytesReturned; - PKSOBJECT_CREATE_ITEM CreateItem; UNICODE_STRING GuidString; PKSP_PIN Pin; LPWSTR DeviceName; - /* access the create item */ - CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp); - IoStack = IoGetCurrentIrpStackLocation(Irp); if (IoStack->Parameters.DeviceIoControl.InputBufferLength < sizeof(KSPROPERTY)) diff --git a/reactos/drivers/wdm/audio/sysaudio/deviface.c b/reactos/drivers/wdm/audio/sysaudio/deviface.c index 605946c300c..bf0011fe533 100644 --- a/reactos/drivers/wdm/audio/sysaudio/deviface.c +++ b/reactos/drivers/wdm/audio/sysaudio/deviface.c @@ -133,11 +133,8 @@ DeviceInterfaceChangeCallback( { DEVICE_INTERFACE_CHANGE_NOTIFICATION * Event; NTSTATUS Status = STATUS_SUCCESS; - PSYSAUDIODEVEXT DeviceExtension; PDEVICE_OBJECT DeviceObject = (PDEVICE_OBJECT)Context; - DeviceExtension = (PSYSAUDIODEVEXT)DeviceObject->DeviceExtension; - Event = (DEVICE_INTERFACE_CHANGE_NOTIFICATION*)NotificationStructure; if (IsEqualGUIDAligned(&Event->Event, diff --git a/reactos/lib/drivers/ip/network/icmp.c b/reactos/lib/drivers/ip/network/icmp.c index 708381ff4bf..eda19241698 100644 --- a/reactos/lib/drivers/ip/network/icmp.c +++ b/reactos/lib/drivers/ip/network/icmp.c @@ -160,7 +160,6 @@ NTSTATUS ICMPSendDatagram( IP_PACKET Packet; PTA_IP_ADDRESS RemoteAddressTa = (PTA_IP_ADDRESS)ConnInfo->RemoteAddress; IP_ADDRESS RemoteAddress, LocalAddress; - USHORT RemotePort; NTSTATUS Status; PNEIGHBOR_CACHE_ENTRY NCE; KIRQL OldIrql; @@ -170,15 +169,14 @@ NTSTATUS ICMPSendDatagram( TI_DbgPrint(MID_TRACE,("RemoteAddressTa: %x\n", RemoteAddressTa)); switch( RemoteAddressTa->Address[0].AddressType ) { - case TDI_ADDRESS_TYPE_IP: - RemoteAddress.Type = IP_ADDRESS_V4; - RemoteAddress.Address.IPv4Address = - RemoteAddressTa->Address[0].Address[0].in_addr; - RemotePort = RemoteAddressTa->Address[0].Address[0].sin_port; - break; + case TDI_ADDRESS_TYPE_IP: + RemoteAddress.Type = IP_ADDRESS_V4; + RemoteAddress.Address.IPv4Address = + RemoteAddressTa->Address[0].Address[0].in_addr; + break; - default: - return STATUS_UNSUCCESSFUL; + default: + return STATUS_UNSUCCESSFUL; } TI_DbgPrint(MID_TRACE,("About to get route to destination\n")); diff --git a/reactos/lib/drivers/ip/network/router.c b/reactos/lib/drivers/ip/network/router.c index d5411240549..3dac6cbda1b 100644 --- a/reactos/lib/drivers/ip/network/router.c +++ b/reactos/lib/drivers/ip/network/router.c @@ -252,7 +252,7 @@ PNEIGHBOR_CACHE_ENTRY RouterGetRoute(PIP_ADDRESS Destination) PLIST_ENTRY CurrentEntry; PLIST_ENTRY NextEntry; PFIB_ENTRY Current; - UCHAR State, BestState = 0; + UCHAR State; UINT Length, BestLength = 0, MaskLength; PNEIGHBOR_CACHE_ENTRY NCE, BestNCE = NULL; @@ -281,7 +281,6 @@ PNEIGHBOR_CACHE_ENTRY RouterGetRoute(PIP_ADDRESS Destination) /* This seems to be a better router */ BestNCE = NCE; BestLength = Length; - BestState = State; TI_DbgPrint(DEBUG_ROUTER,("Route selected\n")); } diff --git a/reactos/lib/drivers/ip/transport/tcp/tcp.c b/reactos/lib/drivers/ip/transport/tcp/tcp.c index 1cae50620ee..dc1940aa24b 100644 --- a/reactos/lib/drivers/ip/transport/tcp/tcp.c +++ b/reactos/lib/drivers/ip/transport/tcp/tcp.c @@ -34,13 +34,12 @@ DisconnectTimeoutDpc(PKDPC Dpc, PCONNECTION_ENDPOINT Connection = (PCONNECTION_ENDPOINT)DeferredContext; PLIST_ENTRY Entry; PTDI_BUCKET Bucket; - NTSTATUS Status; - + LockObjectAtDpcLevel(Connection); - + /* We timed out waiting for pending sends so force it to shutdown */ - Status = TCPTranslateError(LibTCPShutdown(Connection, 0, 1)); - + TCPTranslateError(LibTCPShutdown(Connection, 0, 1)); + while (!IsListEmpty(&Connection->SendRequest)) { Entry = RemoveHeadList(&Connection->SendRequest); @@ -151,12 +150,9 @@ NTSTATUS TCPSocket( PCONNECTION_ENDPOINT Connection, NTSTATUS TCPClose( PCONNECTION_ENDPOINT Connection ) { KIRQL OldIrql; - PVOID Socket; LockObject(Connection, &OldIrql); - Socket = Connection->SocketContext; - FlushAllQueues(Connection, STATUS_CANCELLED); LibTCPClose(Connection, FALSE, TRUE); diff --git a/reactos/lib/drivers/sound/mmixer/midi.c b/reactos/lib/drivers/sound/mmixer/midi.c index 4809c910eab..a6f5d655672 100644 --- a/reactos/lib/drivers/sound/mmixer/midi.c +++ b/reactos/lib/drivers/sound/mmixer/midi.c @@ -126,7 +126,6 @@ MMixerCheckFilterPinMidiSupport( PKSDATARANGE DataRange; KSPIN_COMMUNICATION Communication; KSPIN_DATAFLOW DataFlow; - MIXER_STATUS Status; /* get first datarange */ DataRange = (PKSDATARANGE)(MultipleItem + 1); @@ -146,11 +145,11 @@ MMixerCheckFilterPinMidiSupport( { if (DataFlow == KSPIN_DATAFLOW_IN && Communication == KSPIN_COMMUNICATION_SINK) { - Status = MMixerAddMidiPin(MixerContext, MixerList, MixerData->DeviceId, PinId, FALSE, szPname); + MMixerAddMidiPin(MixerContext, MixerList, MixerData->DeviceId, PinId, FALSE, szPname); } else if (DataFlow == KSPIN_DATAFLOW_OUT && Communication == KSPIN_COMMUNICATION_SOURCE) { - Status = MMixerAddMidiPin(MixerContext, MixerList, MixerData->DeviceId, PinId, TRUE, szPname); + MMixerAddMidiPin(MixerContext, MixerList, MixerData->DeviceId, PinId, TRUE, szPname); } } } diff --git a/reactos/lib/drivers/sound/mmixer/topology.c b/reactos/lib/drivers/sound/mmixer/topology.c index c1d4c3d1051..df614cf19c2 100644 --- a/reactos/lib/drivers/sound/mmixer/topology.c +++ b/reactos/lib/drivers/sound/mmixer/topology.c @@ -525,16 +525,12 @@ MMixerExploreTopology( IN OUT PTOPOLOGY Topology) { ULONG Index; - LPGUID Guids; PKSTOPOLOGY_CONNECTION Connection; MIXER_STATUS Status; /* sanity check */ ASSERT(Topology->TopologyNodesCount == NodeTypes->Count); - /* get topology node types */ - Guids = (LPGUID)(NodeTypes + 1); - /* get node connections */ Connection = (PKSTOPOLOGY_CONNECTION)(NodeConnections + 1); diff --git a/reactos/lib/fslib/vfatlib/fat32.c b/reactos/lib/fslib/vfatlib/fat32.c index 0137fabe70c..cd1cfaf7209 100644 --- a/reactos/lib/fslib/vfatlib/fat32.c +++ b/reactos/lib/fslib/vfatlib/fat32.c @@ -357,7 +357,6 @@ Fat32Format(IN HANDLE FileHandle, { FAT32_BOOT_SECTOR BootSector; OEM_STRING VolumeLabel; - ULONG RootDirSectors; ULONG TmpVal1; ULONG TmpVal2; NTSTATUS Status; @@ -426,9 +425,6 @@ Fat32Format(IN HANDLE FileHandle, memcpy(&BootSector.SysType[0], "FAT32 ", 8); - RootDirSectors = ((BootSector.RootEntries * 32) + - (BootSector.BytesPerSector - 1)) / BootSector.BytesPerSector; - /* Calculate number of FAT sectors */ /* (BytesPerSector / 4) FAT entries (32bit) fit into one sector */ TmpVal1 = BootSector.SectorsHuge - BootSector.ReservedSectors; diff --git a/reactos/lib/fslib/vfatlib/vfatlib.c b/reactos/lib/fslib/vfatlib/vfatlib.c index e46501c0fba..f3b01462930 100644 --- a/reactos/lib/fslib/vfatlib/vfatlib.c +++ b/reactos/lib/fslib/vfatlib/vfatlib.c @@ -329,7 +329,10 @@ VfatChkdsk(IN PUNICODE_STRING DriveRoot, IN BOOLEAN ScanDrive, IN PFMIFSCALLBACK Callback) { - BOOLEAN verify, salvage_files; +#if 0 + BOOLEAN verify; + BOOLEAN salvage_files; +#endif //ULONG free_clusters; //DOS_FS fs; @@ -344,9 +347,10 @@ VfatChkdsk(IN PUNICODE_STRING DriveRoot, FsCheckTotalFiles = 0; +#if 0 verify = TRUE; salvage_files = TRUE; -#if 0 + /* Open filesystem */ fs_open(DriveRoot,FixErrors);