From 255807f7681df081195532f5664315513ce23615 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Tue, 8 Sep 2020 04:28:50 +0200 Subject: [PATCH] [LOCALSPL] InitializePrinterDrivers(): Fix LocalGetPrinterDriverDirectory) call Fix Clang-Cl '...\printerdrivers.c(97,98): warning: variable 'cbBuf' is uninitialized when used here [-Wuninitialized]' Addendum to 62c4b82. CORE-14306 --- win32ss/printing/providers/localspl/printerdrivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32ss/printing/providers/localspl/printerdrivers.c b/win32ss/printing/providers/localspl/printerdrivers.c index 2a5ed369eed..977c4b7890f 100644 --- a/win32ss/printing/providers/localspl/printerdrivers.c +++ b/win32ss/printing/providers/localspl/printerdrivers.c @@ -94,7 +94,7 @@ InitializePrinterDrivers(VOID) StringCbCopyW(wszPrintUiFile, sizeof(wszPrintUiFile), szSysDir); StringCbCatW(wszPrintUiFile, sizeof(wszPrintUiFile), L"\\printui.dll"); - if (!LocalGetPrinterDriverDirectory( NULL, (PWSTR)wszCurrentEnvironment, 1, (PBYTE)szSysDir, cbBuf, &cbBuf ) ) + if (!LocalGetPrinterDriverDirectory(NULL, (PWSTR)wszCurrentEnvironment, 1, (PBYTE)szSysDir, (DWORD)sizeof(szSysDir), &cbBuf)) { ERR("LocalGetPrinterDriverDirectory failed\n"); return FALSE;