tAdd cast to quiet a compiler warning - vaccinewars - be a doctor and try to vaccinate the world
HTML git clone git://src.adamsgaard.dk/vaccinewars
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit ea69921cfddd9b707971f51457627a9052b7e906
DIR parent ea8800fdfb949fb2b4516d11daac56e4e9a16adc
HTML Author: Ben Webb <ben@salilab.org>
Date: Sat, 7 Nov 2020 21:04:42 -0800
Add cast to quiet a compiler warning
Windows registry functions technically take
unsigned char* but we're passing char*, so the
compiler will warn. Add an explicit cast.
Diffstat:
M src/serverside.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/src/serverside.c b/src/serverside.c
t@@ -1934,7 +1934,7 @@ static FILE *OpenHighScoreAppData(int *error, gboolean *empty)
if (RegQueryValueEx(key, subval, NULL, &keytype, NULL,
&keylen) == ERROR_SUCCESS && keytype == REG_SZ) {
char *keyval = g_malloc(keylen);
- if (RegQueryValueEx(key, subval, NULL, &keytype, keyval,
+ if (RegQueryValueEx(key, subval, NULL, &keytype, (LPBYTE)keyval,
&keylen) == ERROR_SUCCESS) {
GString *str = g_string_sized_new(keylen + 40);
g_string_assign(str, keyval);