winecfg: Win64 printf format warning fixes.

This commit is contained in:
Michael Stefaniuc 2006-10-02 23:19:18 +02:00 committed by Alexandre Julliard
parent 6c1ac02631
commit 381fa6588f
4 changed files with 12 additions and 13 deletions

View File

@ -6,7 +6,6 @@ MODULE = winecfg.exe
APPMODE = -mwindows APPMODE = -mwindows
IMPORTS = comdlg32 comctl32 shell32 ole32 winmm shlwapi uxtheme user32 gdi32 advapi32 kernel32 IMPORTS = comdlg32 comctl32 shell32 ole32 winmm shlwapi uxtheme user32 gdi32 advapi32 kernel32
EXTRALIBS = -luuid EXTRALIBS = -luuid
EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \ C_SRCS = \
appdefaults.c \ appdefaults.c \

View File

@ -360,7 +360,7 @@ static void on_winver_change(HWND dialog)
switch (win_versions[selection].dwPlatformId) switch (win_versions[selection].dwPlatformId)
{ {
case VER_PLATFORM_WIN32_WINDOWS: case VER_PLATFORM_WIN32_WINDOWS:
snprintf(Buffer, sizeof(Buffer), "%ld.%ld.%ld", win_versions[selection].dwMajorVersion, snprintf(Buffer, sizeof(Buffer), "%d.%d.%d", win_versions[selection].dwMajorVersion,
win_versions[selection].dwMinorVersion, win_versions[selection].dwBuildNumber); win_versions[selection].dwMinorVersion, win_versions[selection].dwBuildNumber);
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "VersionNumber", Buffer); set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "VersionNumber", Buffer);
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "SubVersionNumber", win_versions[selection].szCSDVersion); set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "SubVersionNumber", win_versions[selection].szCSDVersion);
@ -374,11 +374,11 @@ static void on_winver_change(HWND dialog)
break; break;
case VER_PLATFORM_WIN32_NT: case VER_PLATFORM_WIN32_NT:
snprintf(Buffer, sizeof(Buffer), "%ld.%ld", win_versions[selection].dwMajorVersion, snprintf(Buffer, sizeof(Buffer), "%d.%d", win_versions[selection].dwMajorVersion,
win_versions[selection].dwMinorVersion); win_versions[selection].dwMinorVersion);
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", Buffer); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", Buffer);
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", win_versions[selection].szCSDVersion); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", win_versions[selection].szCSDVersion);
snprintf(Buffer, sizeof(Buffer), "%ld", win_versions[selection].dwBuildNumber); snprintf(Buffer, sizeof(Buffer), "%d", win_versions[selection].dwBuildNumber);
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", Buffer); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", Buffer);
set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, "ProductType", win_versions[selection].szProductType); set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, "ProductType", win_versions[selection].szProductType);
set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyWindNT, "CSDVersion", set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyWindNT, "CSDVersion",

View File

@ -322,7 +322,7 @@ void load_drives()
serial = 0; serial = 0;
} }
WINE_TRACE("serial: '0x%lX'\n", serial); WINE_TRACE("serial: '0x%X'\n", serial);
/* build rootpath for GetDriveType() */ /* build rootpath for GetDriveType() */
lstrcpynA(rootpath, devices, sizeof(rootpath)); lstrcpynA(rootpath, devices, sizeof(rootpath));
@ -343,7 +343,7 @@ void load_drives()
c = targetpath; c = targetpath;
do if (*c == '\\') *c = '/'; while (*c++); do if (*c == '\\') *c = '/'; while (*c++);
snprintf(serialstr, sizeof(serialstr), "%lX", serial); snprintf(serialstr, sizeof(serialstr), "%X", serial);
WINE_TRACE("serialstr: '%s'\n", serialstr); WINE_TRACE("serialstr: '%s'\n", serialstr);
add_drive(*devices, targetpath, volname, serialstr, get_drive_type(devices[0]) ); add_drive(*devices, targetpath, volname, serialstr, get_drive_type(devices[0]) );
@ -486,7 +486,7 @@ void apply_drive_changes(void)
if (drives[i].label && strcmp(drives[i].label, volumeNameBuffer)) if (drives[i].label && strcmp(drives[i].label, volumeNameBuffer))
set_drive_label( drives[i].letter, drives[i].label ); set_drive_label( drives[i].letter, drives[i].label );
snprintf(newSerialNumberText, sizeof(newSerialNumberText), "%lX", serialNumber); snprintf(newSerialNumberText, sizeof(newSerialNumberText), "%X", serialNumber);
if (drives[i].serial && drives[i].serial[0] && strcmp(drives[i].serial, newSerialNumberText)) if (drives[i].serial && drives[i].serial[0] && strcmp(drives[i].serial, newSerialNumberText))
set_drive_serial( drives[i].letter, drives[i].serial ); set_drive_serial( drives[i].letter, drives[i].serial );

View File

@ -119,7 +119,7 @@ static char *get_config_key (HKEY root, const char *subkey, const char *name, co
} }
else else
{ {
WINE_ERR("RegOpenKey failed on wine config key (res=%ld)\n", res); WINE_ERR("RegOpenKey failed on wine config key (res=%d)\n", res);
} }
goto end; goto end;
} }
@ -132,7 +132,7 @@ static char *get_config_key (HKEY root, const char *subkey, const char *name, co
goto end; goto end;
} else if (res != ERROR_SUCCESS) } else if (res != ERROR_SUCCESS)
{ {
WINE_ERR("Couldn't query value's length (res=%ld)\n", res); WINE_ERR("Couldn't query value's length (res=%d)\n", res);
goto end; goto end;
} }
@ -162,7 +162,7 @@ static int set_config_key(HKEY root, const char *subkey, const char *name, const
DWORD res = 1; DWORD res = 1;
HKEY key = NULL; HKEY key = NULL;
WINE_TRACE("subkey=%s: name=%s, value=%p, type=%ld\n", subkey, name, value, type); WINE_TRACE("subkey=%s: name=%s, value=%p, type=%d\n", subkey, name, value, type);
assert( subkey != NULL ); assert( subkey != NULL );
@ -184,7 +184,7 @@ static int set_config_key(HKEY root, const char *subkey, const char *name, const
res = 0; res = 0;
end: end:
if (key && key != root) RegCloseKey(key); if (key && key != root) RegCloseKey(key);
if (res != 0) WINE_ERR("Unable to set configuration key %s in section %s, res=%ld\n", name, subkey, res); if (res != 0) WINE_ERR("Unable to set configuration key %s in section %s, res=%d\n", name, subkey, res);
return res; return res;
} }
@ -492,7 +492,7 @@ char **enumerate_values(HKEY root, char *path)
} }
else else
{ {
WINE_WARN("failed opening registry key %s, res=0x%lx\n", path, res); WINE_WARN("failed opening registry key %s, res=0x%x\n", path, res);
} }
WINE_TRACE("adding settings in list but not registry\n"); WINE_TRACE("adding settings in list but not registry\n");
@ -629,7 +629,7 @@ int initialize(HINSTANCE hInstance)
DWORD res = RegCreateKey(HKEY_CURRENT_USER, WINE_KEY_ROOT, &config_key); DWORD res = RegCreateKey(HKEY_CURRENT_USER, WINE_KEY_ROOT, &config_key);
if (res != ERROR_SUCCESS) { if (res != ERROR_SUCCESS) {
WINE_ERR("RegOpenKey failed on wine config key (%ld)\n", res); WINE_ERR("RegOpenKey failed on wine config key (%d)\n", res);
return 1; return 1;
} }