Fix GCC build (2/2)
authorColin Finck <colin@reactos.org>
Sun, 16 Apr 2017 15:37:31 +0000 (15:37 +0000)
committerColin Finck <colin@reactos.org>
Sun, 16 Apr 2017 15:37:31 +0000 (15:37 +0000)
svn path=/trunk/; revision=74326

reactos/win32ss/printing/base/spoolss/printers.c
reactos/win32ss/printing/base/spoolss/tools.c
reactos/win32ss/printing/include/spoolss.h
reactos/win32ss/printing/providers/localspl/main.c
reactos/win32ss/printing/providers/localspl/precomp.h
reactos/win32ss/printing/providers/localspl/printers.c

index 51e3f87..ecd64d0 100644 (file)
@@ -65,7 +65,6 @@ EndPagePrinter(HANDLE hPrinter)
 BOOL WINAPI
 EnumPrintersW(DWORD Flags, PWSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
 {
-    BOOL bReturnValue;
     DWORD cbCallBuffer;
     DWORD cbNeeded;
     DWORD dwErrorCode = 0xFFFFFFFF;
@@ -94,7 +93,7 @@ EnumPrintersW(DWORD Flags, PWSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cb
         pPrintProvider = CONTAINING_RECORD(pEntry, SPOOLSS_PRINT_PROVIDER, Entry);
 
         // Call the EnumPrinters function of this Print Provider.
-        bReturnValue = pPrintProvider->PrintProvider.fpEnumPrinters(Flags, Name, Level, pCallBuffer, cbCallBuffer, &cbNeeded, &dwReturned);
+        pPrintProvider->PrintProvider.fpEnumPrinters(Flags, Name, Level, pCallBuffer, cbCallBuffer, &cbNeeded, &dwReturned);
 
         // Add the returned counts to the total values.
         *pcbNeeded += cbNeeded;
index c287080..e3bf197 100644 (file)
@@ -2,7 +2,7 @@
  * PROJECT:     ReactOS Spooler Router
  * LICENSE:     GNU LGPL v2.1 or any later version as published by the Free Software Foundation
  * PURPOSE:     Miscellaneous tool functions
- * COPYRIGHT:   Copyright 2015 Colin Finck <colin@reactos.org>
+ * COPYRIGHT:   Copyright 2015-2017 Colin Finck <colin@reactos.org>
  */
 
 #include "precomp.h"
@@ -86,7 +86,7 @@ MarshallDownStructure(PVOID pStructure, PMARSHALL_DOWN_INFO pParameters, DWORD c
  * The strings are copied in reverse order, so this pointer will point to the last copied string of pSource.
  */
 PBYTE WINAPI
-PackStrings(PCWSTR* pSource, PBYTE pDest, const DWORD* DestOffsets, PBYTE pEnd)
+PackStrings(PWSTR* pSource, PBYTE pDest, const DWORD* DestOffsets, PBYTE pEnd)
 {
     DWORD cbString;
     ULONG_PTR StringAddress;
index b6c4f80..bbbbee9 100644 (file)
@@ -26,7 +26,7 @@ BOOL WINAPI DllFreeSplMem(PVOID pMem);
 BOOL WINAPI DllFreeSplStr(PWSTR pwszString);
 BOOL WINAPI InitializeRouter(HANDLE SpoolerStatusHandle);
 BOOL WINAPI MarshallDownStructure(PVOID pStructure, PMARSHALL_DOWN_INFO pParameters, DWORD cbStructureSize, BOOL bSomeBoolean);
-PBYTE WINAPI PackStrings(PCWSTR* pSource, PBYTE pDest, const DWORD* DestOffsets, PBYTE pEnd);
+PBYTE WINAPI PackStrings(PWSTR* pSource, PBYTE pDest, const DWORD* DestOffsets, PBYTE pEnd);
 PVOID WINAPI ReallocSplMem(PVOID pOldMem, DWORD cbOld, DWORD cbNew);
 BOOL WINAPI ReallocSplStr(PWSTR* ppwszString, PCWSTR pwszInput);
 BOOL WINAPI SplInitializeWinSpoolDrv(PVOID* pTable);
index 458edba..c9c424a 100644 (file)
@@ -16,7 +16,7 @@ DWORD cchSpoolDirectory;
 
 const WCHAR wszDefaultDocumentName[] = L"Local Downlevel Document";
 
-const WCHAR* wszPrintProviderInfo[3] = {
+PWSTR wszPrintProviderInfo[3] = {
     L"Windows NT Local Print Providor",     // Name
     L"Locally connected Printers",          // Comment
     L"Windows NT Local Printers"            // Description
index 98e219b..699ba02 100644 (file)
@@ -258,7 +258,7 @@ BOOL WriteJobShadowFile(PWSTR pwszFilePath, const PLOCAL_JOB pJob);
 extern const WCHAR wszCurrentEnvironment[];
 extern const DWORD cbCurrentEnvironment;
 extern const WCHAR wszDefaultDocumentName[];
-extern const WCHAR* wszPrintProviderInfo[3];
+extern PWSTR wszPrintProviderInfo[3];
 extern WCHAR wszSpoolDirectory[MAX_PATH];
 extern DWORD cchSpoolDirectory;
 
index 8a8056c..4cc532d 100644 (file)
@@ -386,9 +386,9 @@ _LocalEnumPrintersLevel1(DWORD Flags, PCWSTR Name, PBYTE pPrinterEnum, DWORD cbB
 {
     const WCHAR wszComma[] = L",";
 
-    DWORD cbName;
-    DWORD cbComment;
-    DWORD cbDescription;
+    size_t cbName;
+    size_t cbComment;
+    size_t cbDescription;
     DWORD cchComputerName = 0;
     DWORD dwErrorCode;
     DWORD i;