https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3c722e35b1c89cb07bfa3…
commit 3c722e35b1c89cb07bfa3c281be2c2e013c008f6
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Aug 20 17:47:40 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Fri Nov 6 01:06:11 2020 +0100
[CMD][SERVMAN][SHELL32][WINSPOOL][ROSAPPS][NTOS:PNP] Fix my build.
---
base/applications/mscutils/servman/mainwnd.c | 4 ++--
base/shell/cmd/batch.c | 4 +++-
dll/win32/shell32/shellrecyclebin/recyclebin_v5.c | 3 ++-
dll/win32/shell32/wine/shellord.c | 2 +-
modules/rostests/apitests/shlwapi/SHLoadIndirectString.c | 3 ++-
modules/rostests/apitests/utildll/CachedGetUserFromSid.c | 14 +++++++-------
ntoskrnl/io/pnpmgr/devaction.c | 6 ++++--
win32ss/printing/base/winspool/jobs.c | 4 ++--
8 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/base/applications/mscutils/servman/mainwnd.c
b/base/applications/mscutils/servman/mainwnd.c
index d96b4a32e79..1b016fb593b 100644
--- a/base/applications/mscutils/servman/mainwnd.c
+++ b/base/applications/mscutils/servman/mainwnd.c
@@ -380,12 +380,12 @@ MainWndCommand(PMAIN_WND_INFO Info,
WORD CmdId,
HWND hControl)
{
- UNREFERENCED_PARAMETER(hControl);
-
WCHAR szAppName[256];
WCHAR szAppAuthors[256];
HICON hIcon;
+ UNREFERENCED_PARAMETER(hControl);
+
switch (CmdId)
{
case ID_PROP:
diff --git a/base/shell/cmd/batch.c b/base/shell/cmd/batch.c
index 36600cd0720..8fc6bf8466e 100644
--- a/base/shell/cmd/batch.c
+++ b/base/shell/cmd/batch.c
@@ -409,11 +409,13 @@ INT Batch(LPTSTR fullname, LPTSTR firstword, LPTSTR param,
PARSED_COMMAND *Cmd)
/* Perform top-level batch initialization */
if (bTopLevel)
{
+ TCHAR *dot;
+
/* Default the top-level batch context type to .BAT */
BatType = BAT_TYPE;
/* If this is a .CMD file, adjust the type */
- TCHAR *dot = _tcsrchr(bc->BatchFilePath, _T('.'));
+ dot = _tcsrchr(bc->BatchFilePath, _T('.'));
if (dot && (!_tcsicmp(dot, _T(".cmd"))))
{
BatType = CMD_TYPE;
diff --git a/dll/win32/shell32/shellrecyclebin/recyclebin_v5.c
b/dll/win32/shell32/shellrecyclebin/recyclebin_v5.c
index 4e333da9f27..766bf4f4631 100644
--- a/dll/win32/shell32/shellrecyclebin/recyclebin_v5.c
+++ b/dll/win32/shell32/shellrecyclebin/recyclebin_v5.c
@@ -474,6 +474,7 @@ RecycleBin5_RecycleBin5_Restore(
DELETED_FILE_RECORD *pRecord, *pLast;
DWORD dwEntries, i;
SHFILEOPSTRUCTW op;
+ int res;
TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile);
@@ -503,7 +504,7 @@ RecycleBin5_RecycleBin5_Restore(
op.pFrom = pDeletedFileName;
op.pTo = pDeletedFile->FileNameW;
- int res = SHFileOperationW(&op);
+ res = SHFileOperationW(&op);
if (res)
{
ERR("SHFileOperationW failed with 0x%x\n", res);
diff --git a/dll/win32/shell32/wine/shellord.c b/dll/win32/shell32/wine/shellord.c
index 37ff171d4b6..0b3965711c2 100644
--- a/dll/win32/shell32/wine/shellord.c
+++ b/dll/win32/shell32/wine/shellord.c
@@ -1486,8 +1486,8 @@ BOOL WINAPI SHRunControlPanel (_In_ LPCWSTR commandLine, _In_opt_
HWND parent)
* However we need to keep it "alive" even when ReactOS is compliled as
NT6+
* in order to keep control panel elements launch commands.
*/
- TRACE("(%s, %p)n", debugstr_w(commandLine), parent);
WCHAR parameters[MAX_PATH] = L"shell32.dll,Control_RunDLL ";
+ TRACE("(%s, %p)n", debugstr_w(commandLine), parent);
wcscat(parameters, commandLine);
return ((INT_PTR)ShellExecuteW(parent, L"open", L"rundll32.exe",
parameters, NULL, SW_SHOWNORMAL) > 32);
diff --git a/modules/rostests/apitests/shlwapi/SHLoadIndirectString.c
b/modules/rostests/apitests/shlwapi/SHLoadIndirectString.c
index f086a7e2514..0eac5b04db6 100644
--- a/modules/rostests/apitests/shlwapi/SHLoadIndirectString.c
+++ b/modules/rostests/apitests/shlwapi/SHLoadIndirectString.c
@@ -16,6 +16,7 @@ static void execute_test(LPCWSTR DllFile)
HRESULT hr;
HANDLE hEvent;
DWORD dwRet;
+ HMODULE mod;
hEvent = CreateEventA(NULL, TRUE, FALSE, "Local\\shlwapi_apitest_evt");
@@ -24,7 +25,7 @@ static void execute_test(LPCWSTR DllFile)
ok_hex(dwRet, WAIT_TIMEOUT);
// Ensure the module is not loaded yet...
- HMODULE mod = GetModuleHandleW(DllFile);
+ mod = GetModuleHandleW(DllFile);
if (mod != NULL)
{
CloseHandle(hEvent);
diff --git a/modules/rostests/apitests/utildll/CachedGetUserFromSid.c
b/modules/rostests/apitests/utildll/CachedGetUserFromSid.c
index 04a5ad75e14..0199fda2c06 100644
--- a/modules/rostests/apitests/utildll/CachedGetUserFromSid.c
+++ b/modules/rostests/apitests/utildll/CachedGetUserFromSid.c
@@ -61,26 +61,26 @@ static void test_Sid_Null(void)
START_TEST(CachedGetUserFromSid)
{
const char szFunction[] = "CachedGetUserFromSid";
+ void* pFunction;
// TODO: Dynamically checking, until ReactOS implements this dll.
- HMODULE hModule = LoadLibraryW(L"utildll.dll");
- DWORD dwLE = GetLastError();
+ HMODULE hModule;
+ DWORD dwLE;
+ hModule = LoadLibraryW(L"utildll.dll");
if (!hModule)
{
+ dwLE = GetLastError();
ok(FALSE, "LoadLibraryW(\"%S\") failed! (dwLE = %lu)\n",
L"utildll.dll", dwLE);
-
skip("No DLL\n");
return;
}
- void *pFunction = (void *)GetProcAddress(hModule, szFunction);
- dwLE = GetLastError();
-
+ pFunction = (void*)GetProcAddress(hModule, szFunction);
if (!pFunction)
{
+ dwLE = GetLastError();
ok(FALSE, "GetProcAddress(\"%s\") failed! (dwLE = %lu)\n",
szFunction, dwLE);
-
skip("No function\n");
FreeLibrary(hModule);
return;
diff --git a/ntoskrnl/io/pnpmgr/devaction.c b/ntoskrnl/io/pnpmgr/devaction.c
index 67221e83e20..e6479074f32 100644
--- a/ntoskrnl/io/pnpmgr/devaction.c
+++ b/ntoskrnl/io/pnpmgr/devaction.c
@@ -2404,6 +2404,8 @@ PipDeviceActionWorker(
PLIST_ENTRY ListEntry;
PDEVICE_ACTION_REQUEST Request;
KIRQL OldIrql;
+ PDEVICE_NODE deviceNode;
+ NTSTATUS status;
KeAcquireSpinLock(&IopDeviceActionLock, &OldIrql);
while (!IsListEmpty(&IopDeviceActionRequestList))
@@ -2414,10 +2416,10 @@ PipDeviceActionWorker(
ASSERT(Request->DeviceObject);
- PDEVICE_NODE deviceNode = IopGetDeviceNode(Request->DeviceObject);
+ deviceNode = IopGetDeviceNode(Request->DeviceObject);
ASSERT(deviceNode);
- NTSTATUS status = STATUS_SUCCESS;
+ status = STATUS_SUCCESS;
DPRINT("Processing PnP request %p: DeviceObject - %p, Action - %s\n",
Request, Request->DeviceObject, ActionToStr(Request->Action));
diff --git a/win32ss/printing/base/winspool/jobs.c
b/win32ss/printing/base/winspool/jobs.c
index 69531438653..b0a248e1b37 100644
--- a/win32ss/printing/base/winspool/jobs.c
+++ b/win32ss/printing/base/winspool/jobs.c
@@ -435,9 +435,9 @@ SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo,
DWORD Command
break;
case 1:
{
+ JOB_INFO_1A *info1A = (JOB_INFO_1A*)pJobInfo;
JOB_INFO_1W *info1W = HeapAlloc(GetProcessHeap(), 0, sizeof(*info1W));
ZeroMemory( info1W, sizeof(JOB_INFO_1W) );
- JOB_INFO_1A *info1A = (JOB_INFO_1A*)pJobInfo;
JobW = (LPBYTE)info1W;
info1W->pUserName = AsciiToUnicode(&usBuffer, info1A->pUserName);
@@ -452,9 +452,9 @@ SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo,
DWORD Command
}
case 2:
{
+ JOB_INFO_2A *info2A = (JOB_INFO_2A*)pJobInfo;
JOB_INFO_2W *info2W = HeapAlloc(GetProcessHeap(), 0, sizeof(*info2W));
ZeroMemory( info2W, sizeof(JOB_INFO_2W) );
- JOB_INFO_2A *info2A = (JOB_INFO_2A*)pJobInfo;
JobW = (LPBYTE)info2W;
info2W->pUserName = AsciiToUnicode(&usBuffer, info2A->pUserName);