gcc 4.0 RegSetValueEx warning fixes.

This commit is contained in:
Mike McCormack 2005-08-03 11:03:44 +00:00 committed by Alexandre Julliard
parent 50a6d970f5
commit bc4a576a06
2 changed files with 13 additions and 13 deletions

View File

@ -825,7 +825,7 @@ static void testNonExistentPath(void)
modifiedPath[len++] = '\0';
if (winetest_interactive)
printf("Changing CSIDL_FAVORITES to %s\n", modifiedPath);
if (!RegSetValueExA(key, "Favorites", 0, type, modifiedPath, len))
if (!RegSetValueExA(key, "Favorites", 0, type, (LPBYTE) modifiedPath, len))
{
char buffer[MAX_PATH];
STARTUPINFOA startup;
@ -852,7 +852,7 @@ static void testNonExistentPath(void)
/* restore original values: */
if (winetest_interactive)
printf("Restoring CSIDL_FAVORITES to %s\n", originalPath);
RegSetValueExA(key, "Favorites", 0, type, originalPath,
RegSetValueExA(key, "Favorites", 0, type, (LPBYTE) originalPath,
strlen(originalPath) + 1);
RegFlushKey(key);

View File

@ -224,7 +224,7 @@ WINSPOOL_SetDefaultPrinter(const char *devname, const char *name,BOOL force) {
sprintf(buf,"%s,WINEPS.DRV,LPR:%s",devname,name);
WriteProfileStringA("windows","device",buf);
if(RegCreateKeyW(HKEY_CURRENT_USER, user_default_reg_key, &hkey) == ERROR_SUCCESS) {
RegSetValueExA(hkey, "Device", 0, REG_SZ, buf, strlen(buf) + 1);
RegSetValueExA(hkey, "Device", 0, REG_SZ, (LPBYTE)buf, strlen(buf) + 1);
RegCloseKey(hkey);
}
HeapFree(GetProcessHeap(),0,buf);
@ -275,7 +275,7 @@ static BOOL CUPS_LoadPrinters(void)
sprintf(devline,"WINEPS.DRV,%s",port);
WriteProfileStringA("devices",dests[i].name,devline);
if(RegCreateKeyW(HKEY_CURRENT_USER, user_printers_reg_key, &hkey) == ERROR_SUCCESS) {
RegSetValueExA(hkey, dests[i].name, 0, REG_SZ, devline, strlen(devline) + 1);
RegSetValueExA(hkey, dests[i].name, 0, REG_SZ, (LPBYTE)devline, strlen(devline) + 1);
RegCloseKey(hkey);
}
HeapFree(GetProcessHeap(),0,devline);
@ -384,7 +384,7 @@ PRINTCAP_ParseEntry(char *pent,BOOL isfirst) {
sprintf(devline,"WINEPS.DRV,%s",port);
WriteProfileStringA("devices",devname,devline);
if(RegCreateKeyW(HKEY_CURRENT_USER, user_printers_reg_key, &hkey) == ERROR_SUCCESS) {
RegSetValueExA(hkey, devname, 0, REG_SZ, devline, strlen(devline) + 1);
RegSetValueExA(hkey, devname, 0, REG_SZ, (LPBYTE)devline, strlen(devline) + 1);
RegCloseKey(hkey);
}
HeapFree(GetProcessHeap(),0,devline);
@ -3372,17 +3372,17 @@ BOOL WINAPI AddPrinterDriverA(LPSTR pName, DWORD level, LPBYTE pDriverInfo)
ERR("Can't create Name key\n");
return FALSE;
}
RegSetValueExA(hkeyName, "Configuration File", 0, REG_SZ, di3.pConfigFile,
RegSetValueExA(hkeyName, "Configuration File", 0, REG_SZ, (LPBYTE) di3.pConfigFile,
0);
RegSetValueExA(hkeyName, "Data File", 0, REG_SZ, di3.pDataFile, 0);
RegSetValueExA(hkeyName, "Driver", 0, REG_SZ, di3.pDriverPath, 0);
RegSetValueExA(hkeyName, "Version", 0, REG_DWORD, (LPSTR)&di3.cVersion,
RegSetValueExA(hkeyName, "Data File", 0, REG_SZ, (LPBYTE) di3.pDataFile, 0);
RegSetValueExA(hkeyName, "Driver", 0, REG_SZ, (LPBYTE) di3.pDriverPath, 0);
RegSetValueExA(hkeyName, "Version", 0, REG_DWORD, (LPBYTE) &di3.cVersion,
sizeof(DWORD));
RegSetValueExA(hkeyName, "Datatype", 0, REG_SZ, di3.pDefaultDataType, 0);
RegSetValueExA(hkeyName, "Datatype", 0, REG_SZ, (LPBYTE) di3.pDefaultDataType, 0);
RegSetValueExA(hkeyName, "Dependent Files", 0, REG_MULTI_SZ,
di3.pDependentFiles, 0);
RegSetValueExA(hkeyName, "Help File", 0, REG_SZ, di3.pHelpFile, 0);
RegSetValueExA(hkeyName, "Monitor", 0, REG_SZ, di3.pMonitorName, 0);
(LPBYTE) di3.pDependentFiles, 0);
RegSetValueExA(hkeyName, "Help File", 0, REG_SZ, (LPBYTE) di3.pHelpFile, 0);
RegSetValueExA(hkeyName, "Monitor", 0, REG_SZ, (LPBYTE) di3.pMonitorName, 0);
RegCloseKey(hkeyName);
RegCloseKey(hkeyDrivers);