[BASE][BOOT][WIN32SS]

* Fix some format string / argument mismatches. By Andre Guibert de Bruet.
CORE-7995 #resolve #comment Thanks!

svn path=/trunk/; revision=63084
This commit is contained in:
Amine Khaldi 2014-04-30 19:05:42 +00:00
parent 174da99a46
commit 3d22f7e832
8 changed files with 16 additions and 16 deletions

View file

@ -1620,7 +1620,7 @@ DWORD PNP_CreateDevInst(
dwInstanceNumber = 0; dwInstanceNumber = 0;
do do
{ {
swprintf(szGeneratedInstance, L"Root\\%ls\\%04d", swprintf(szGeneratedInstance, L"Root\\%ls\\%04lu",
pszDeviceID, dwInstanceNumber); pszDeviceID, dwInstanceNumber);
/* Try to create a device instance with this ID */ /* Try to create a device instance with this ID */
@ -2115,7 +2115,7 @@ DWORD PNP_HwProfFlags(
else else
{ {
swprintf(szKeyName, swprintf(szKeyName,
L"System\\CurrentControlSet\\HardwareProfiles\\%04u\\System\\CurrentControlSet\\Enum", L"System\\CurrentControlSet\\HardwareProfiles\\%04lu\\System\\CurrentControlSet\\Enum",
ulConfig); ulConfig);
} }

View file

@ -461,7 +461,7 @@ AddKbLayoutsToRegistry(IN const MUI_LAYOUTS * MuiLayouts)
} }
else else
{ {
swprintf(szLangID, L"d%03u%s", uCount, MuiLayouts[uIndex].LangID); swprintf(szLangID, L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
Status = NtSetValueKey(KeyHandle, Status = NtSetValueKey(KeyHandle,
&ValueName, &ValueName,
0, 0,

View file

@ -93,7 +93,7 @@ static BOOL pendingRename()
} }
else else
{ {
printf("Couldn't open key, error %ld\n", res); printf("Couldn't open key, error %lu\n", res);
res=FALSE; res=FALSE;
} }
@ -113,7 +113,7 @@ static BOOL pendingRename()
if (res!=ERROR_SUCCESS) 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; res=FALSE;
goto end; goto end;
} }
@ -369,7 +369,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
if ((res=RegEnumValueW(hkRun, i, szValue, &nValLength, 0, &type, if ((res=RegEnumValueW(hkRun, i, szValue, &nValLength, 0, &type,
(LPBYTE)szCmdLine, &nDataLength))!=ERROR_SUCCESS) (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; continue;
} }
@ -379,22 +379,22 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
if (bDelete && (res=RegDeleteValueW(hkRun, szValue))!=ERROR_SUCCESS) 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) 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; continue;
} }
if ((res=runCmd(szCmdLine, NULL, bSynchronous, FALSE))==INVALID_RUNCMD_RETURN) if ((res=runCmd(szCmdLine, NULL, bSynchronous, FALSE))==INVALID_RUNCMD_RETURN)
{ {
printf("Error running cmd #%ld (%ld)\n", i, GetLastError()); printf("Error running cmd #%lu (%ld)\n", i, GetLastError());
} }
printf("Done processing cmd #%ld\n", i); printf("Done processing cmd #%lu\n", i);
} }
free(szValue); free(szValue);

View file

@ -73,7 +73,7 @@ static BOOL UpdateSCMStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode,
static void WINAPI ServiceCtrlHandler(DWORD code) static void WINAPI ServiceCtrlHandler(DWORD code)
{ {
WINE_TRACE("%d\n", code); WINE_TRACE("%u\n", code);
switch (code) switch (code)
{ {
@ -83,7 +83,7 @@ static void WINAPI ServiceCtrlHandler(DWORD code)
KillService(); KillService();
return; return;
default: default:
fprintf(stderr, "Unhandled service control code: %d\n", code); fprintf(stderr, "Unhandled service control code: %u\n", code);
break; break;
} }

View file

@ -99,7 +99,7 @@ ScmCreateNewControlPipe(PSERVICE_IMAGE pServiceImage)
} }
/* Create '\\.\pipe\net\NtControlPipeXXX' instance */ /* 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); DPRINT("PipeName: %S\n", szControlPipeName);

View file

@ -115,7 +115,7 @@ LlbHwLoadOsLoaderFromRam(VOID)
/* Set parameters for the OS loader */ /* Set parameters for the OS loader */
snprintf(CommandLine, snprintf(CommandLine,
sizeof(CommandLine), sizeof(CommandLine),
"rdbase=0x%x rdsize=0x%x rdoffset=%s", "rdbase=0x%lx rdsize=0x%lx rdoffset=%s",
RootFs, Size, Offset); RootFs, Size, Offset);
LlbSetCommandLine(CommandLine); LlbSetCommandLine(CommandLine);

View file

@ -351,7 +351,7 @@ do {
* or we are saving settings for a particular console, which differs * or we are saving settings for a particular console, which differs
* from the default ones. * 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]); SetConsoleSetting(szValueName, REG_DWORD, sizeof(DWORD), &ConsoleInfo->Colors[i], s_Colors[i]);
} }

View file

@ -355,7 +355,7 @@ do {
* or we are saving settings for a particular console, which differs * or we are saving settings for a particular console, which differs
* from the default ones. * 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]); SetConsoleSetting(szValueName, REG_DWORD, sizeof(DWORD), &ConsoleInfo->Colors[i], s_Colors[i]);
} }