Author: akhaldi
Date: Wed Apr 30 19:05:42 2014
New Revision: 63084

URL: http://svn.reactos.org/svn/reactos?rev=63084&view=rev
Log:
[BASE][BOOT][WIN32SS]
* Fix some format string / argument mismatches. By Andre Guibert de Bruet.
CORE-7995 #resolve #comment Thanks!

Modified:
    trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
    trunk/reactos/base/setup/usetup/mui.c
    trunk/reactos/base/shell/explorer/services/startup.c
    trunk/reactos/base/system/msiexec/service.c
    trunk/reactos/base/system/services/database.c
    trunk/reactos/boot/armllb/os/loader.c
    trunk/reactos/win32ss/user/winsrv/consrv/settings.c
    trunk/reactos/win32ss/user/winsrv/consrv_new/settings.c

Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/umpnpmgr/umpnpmgr.c?rev=63084&r1=63083&r2=63084&view=diff
==============================================================================
--- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c     [iso-8859-1] (original)
+++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c     [iso-8859-1] Wed Apr 30 
19:05:42 2014
@@ -1620,7 +1620,7 @@
         dwInstanceNumber = 0;
         do
         {
-            swprintf(szGeneratedInstance, L"Root\\%ls\\%04d",
+            swprintf(szGeneratedInstance, L"Root\\%ls\\%04lu",
                      pszDeviceID, dwInstanceNumber);
 
             /* Try to create a device instance with this ID */
@@ -2115,7 +2115,7 @@
     else
     {
         swprintf(szKeyName,
-                 
L"System\\CurrentControlSet\\HardwareProfiles\\%04u\\System\\CurrentControlSet\\Enum",
+                 
L"System\\CurrentControlSet\\HardwareProfiles\\%04lu\\System\\CurrentControlSet\\Enum",
                  ulConfig);
     }
 

Modified: trunk/reactos/base/setup/usetup/mui.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/mui.c?rev=63084&r1=63083&r2=63084&view=diff
==============================================================================
--- trunk/reactos/base/setup/usetup/mui.c       [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/mui.c       [iso-8859-1] Wed Apr 30 
19:05:42 2014
@@ -461,7 +461,7 @@
         }
         else
         {
-            swprintf(szLangID, L"d%03u%s", uCount, MuiLayouts[uIndex].LangID);
+            swprintf(szLangID, L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
             Status = NtSetValueKey(KeyHandle,
                                    &ValueName,
                                    0,

Modified: trunk/reactos/base/shell/explorer/services/startup.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/services/startup.c?rev=63084&r1=63083&r2=63084&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/services/startup.c        [iso-8859-1] 
(original)
+++ trunk/reactos/base/shell/explorer/services/startup.c        [iso-8859-1] 
Wed Apr 30 19:05:42 2014
@@ -93,7 +93,7 @@
         }
         else
         {
-            printf("Couldn't open key, error %ld\n", res);
+            printf("Couldn't open key, error %lu\n", res);
             res=FALSE;
         }
 
@@ -113,7 +113,7 @@
 
     if (res!=ERROR_SUCCESS)
     {
-        printf("Couldn't query value's length (%ld)\n", res);
+        printf("Couldn't query value's length (%lu)\n", res);
         res=FALSE;
         goto end;
     }
@@ -369,7 +369,7 @@
         if ((res=RegEnumValueW(hkRun, i, szValue, &nValLength, 0, &type,
                         (LPBYTE)szCmdLine, &nDataLength))!=ERROR_SUCCESS)
         {
-            printf("Couldn't read in value %ld - %ld\n", i, res);
+            printf("Couldn't read in value %lu - %ld\n", i, res);
 
             continue;
         }
@@ -379,22 +379,22 @@
 
         if (bDelete && (res=RegDeleteValueW(hkRun, szValue))!=ERROR_SUCCESS)
         {
-            printf("Couldn't delete value - %ld, %ld. Running command 
anyways.\n", i, res);
+            printf("Couldn't delete value - %lu, %ld. Running command 
anyways.\n", i, res);
         }
 
         if (type!=REG_SZ)
         {
-            printf("Incorrect type of value #%ld (%ld)\n", i, type);
+            printf("Incorrect type of value #%lu (%lu)\n", i, type);
 
             continue;
         }
 
         if ((res=runCmd(szCmdLine, NULL, bSynchronous, 
FALSE))==INVALID_RUNCMD_RETURN)
         {
-            printf("Error running cmd #%ld (%ld)\n", i, GetLastError());
-        }
-
-        printf("Done processing cmd #%ld\n", i);
+            printf("Error running cmd #%lu (%ld)\n", i, GetLastError());
+        }
+
+        printf("Done processing cmd #%lu\n", i);
     }
 
     free(szValue);

Modified: trunk/reactos/base/system/msiexec/service.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/msiexec/service.c?rev=63084&r1=63083&r2=63084&view=diff
==============================================================================
--- trunk/reactos/base/system/msiexec/service.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/msiexec/service.c [iso-8859-1] Wed Apr 30 
19:05:42 2014
@@ -73,7 +73,7 @@
 
 static void WINAPI ServiceCtrlHandler(DWORD code)
 {
-    WINE_TRACE("%d\n", code);
+    WINE_TRACE("%u\n", code);
 
     switch (code)
     {
@@ -83,7 +83,7 @@
             KillService();
             return;
         default:
-            fprintf(stderr, "Unhandled service control code: %d\n", code);
+            fprintf(stderr, "Unhandled service control code: %u\n", code);
             break;
     }
 

Modified: trunk/reactos/base/system/services/database.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/database.c?rev=63084&r1=63083&r2=63084&view=diff
==============================================================================
--- trunk/reactos/base/system/services/database.c       [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/database.c       [iso-8859-1] Wed Apr 30 
19:05:42 2014
@@ -99,7 +99,7 @@
     }
 
     /* Create '\\.\pipe\net\NtControlPipeXXX' instance */
-    swprintf(szControlPipeName, L"\\\\.\\pipe\\net\\NtControlPipe%u", 
ServiceCurrent);
+    swprintf(szControlPipeName, L"\\\\.\\pipe\\net\\NtControlPipe%lu", 
ServiceCurrent);
 
     DPRINT("PipeName: %S\n", szControlPipeName);
 

Modified: trunk/reactos/boot/armllb/os/loader.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/os/loader.c?rev=63084&r1=63083&r2=63084&view=diff
==============================================================================
--- trunk/reactos/boot/armllb/os/loader.c       [iso-8859-1] (original)
+++ trunk/reactos/boot/armllb/os/loader.c       [iso-8859-1] Wed Apr 30 
19:05:42 2014
@@ -115,7 +115,7 @@
     /* Set parameters for the OS loader */
     snprintf(CommandLine,
              sizeof(CommandLine),
-             "rdbase=0x%x rdsize=0x%x rdoffset=%s",
+             "rdbase=0x%lx rdsize=0x%lx rdoffset=%s",
              RootFs, Size, Offset);
     LlbSetCommandLine(CommandLine);
     

Modified: trunk/reactos/win32ss/user/winsrv/consrv/settings.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv/settings.c?rev=63084&r1=63083&r2=63084&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/settings.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/settings.c [iso-8859-1] Wed Apr 30 
19:05:42 2014
@@ -351,7 +351,7 @@
          * or we are saving settings for a particular console, which differs
          * from the default ones.
          */
-        swprintf(szValueName, L"ColorTable%02d", i);
+        swprintf(szValueName, L"ColorTable%02u", i);
         SetConsoleSetting(szValueName, REG_DWORD, sizeof(DWORD), 
&ConsoleInfo->Colors[i], s_Colors[i]);
     }
 

Modified: trunk/reactos/win32ss/user/winsrv/consrv_new/settings.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv_new/settings.c?rev=63084&r1=63083&r2=63084&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv_new/settings.c     [iso-8859-1] 
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv_new/settings.c     [iso-8859-1] 
Wed Apr 30 19:05:42 2014
@@ -355,7 +355,7 @@
          * or we are saving settings for a particular console, which differs
          * from the default ones.
          */
-        swprintf(szValueName, L"ColorTable%02d", i);
+        swprintf(szValueName, L"ColorTable%02u", i);
         SetConsoleSetting(szValueName, REG_DWORD, sizeof(DWORD), 
&ConsoleInfo->Colors[i], s_Colors[i]);
     }
 


Reply via email to