From 88bddd7ae15f0e71e1f6bb5acbe41e1a1d5a4a57 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 19 Aug 2005 15:19:10 +0000 Subject: [PATCH] Fix gcc 4.0 warnings. --- programs/winecfg/drive.c | 2 +- programs/winecfg/winecfg.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/programs/winecfg/drive.c b/programs/winecfg/drive.c index 8186946a5f2..01519dd80ea 100644 --- a/programs/winecfg/drive.c +++ b/programs/winecfg/drive.c @@ -456,7 +456,7 @@ void apply_drive_changes(void) driveValue, 0, REG_SZ, - typeText, + (LPBYTE) typeText, strlen(typeText) + 1); if(retval != ERROR_SUCCESS) { diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c index 8612619b575..ec2387cc4a7 100644 --- a/programs/winecfg/winecfg.c +++ b/programs/winecfg/winecfg.c @@ -83,7 +83,7 @@ void set_window_title(HWND dialog) */ static char *get_config_key (HKEY root, const char *subkey, const char *name, const char *def) { - LPBYTE buffer = NULL; + LPSTR buffer = NULL; DWORD len; HKEY hSubKey = NULL; DWORD res; @@ -119,13 +119,13 @@ static char *get_config_key (HKEY root, const char *subkey, const char *name, co buffer = HeapAlloc(GetProcessHeap(), 0, len + 1); - RegQueryValueEx(hSubKey, name, NULL, NULL, buffer, &len); + RegQueryValueEx(hSubKey, name, NULL, NULL, (LPBYTE) buffer, &len); WINE_TRACE("buffer=%s\n", buffer); end: if (hSubKey && hSubKey != root) RegCloseKey(hSubKey); - return (char*)buffer; + return buffer; } /** @@ -139,11 +139,11 @@ end: * * If valueName or value is NULL, an empty section will be created */ -static int set_config_key(HKEY root, const char *subkey, const char *name, const BYTE *value, DWORD type) { +static int set_config_key(HKEY root, const char *subkey, const char *name, const void *value, DWORD type) { DWORD res = 1; HKEY key = NULL; - WINE_TRACE("subkey=%s: name=%s, value=%s, type=%ld\n", subkey, name, value, type); + WINE_TRACE("subkey=%s: name=%s, value=%p, type=%ld\n", subkey, name, value, type); assert( subkey != NULL ); @@ -165,7 +165,7 @@ static int set_config_key(HKEY root, const char *subkey, const char *name, const res = 0; end: if (key && key != root) RegCloseKey(key); - if (res != 0) WINE_ERR("Unable to set configuration key %s in section %s to %s, res=%ld\n", name, subkey, value, res); + if (res != 0) WINE_ERR("Unable to set configuration key %s in section %s, res=%ld\n", name, subkey, res); return res; }