X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fos.c;h=1554d35af685d8091411f7472df615dfde754053;hb=f58dce81384e4324f00f4ca51830f3245d15136b;hp=9c4e725c7be8f3222e42c428e5034dca1f448e46;hpb=8bf1104532ba4fbf5dc3efb444067f3ad6291785;p=swftools.git diff --git a/lib/os.c b/lib/os.c index 9c4e725..1554d35 100755 --- a/lib/os.c +++ b/lib/os.c @@ -50,13 +50,13 @@ char* getRegistryEntry(char*path) fprintf(stderr, "RegOpenKeyEx failed\n"); return 0; } - rc = RegQueryValueEx(key, NULL, 0, 0, 0, &size) ; + rc = RegQueryValueEx(key, NULL, 0, 0, 0, (LPDWORD)&size) ; if(rc != ERROR_SUCCESS) { fprintf(stderr, "RegQueryValueEx(1) failed: %d\n", rc); return 0; } - buf = malloc(size+1); - rc = RegQueryValueEx(key, NULL, 0, &type, (BYTE*)buf, &size); + buf = (char*)malloc(size+1); + rc = RegQueryValueEx(key, NULL, 0, &type, (BYTE*)buf, (LPDWORD)&size); if(rc != ERROR_SUCCESS) { fprintf(stderr, "RegQueryValueEx(2) failed: %d\n", rc); return 0; @@ -120,7 +120,7 @@ char* concatPaths(const char*base, const char*add) while(pos < l2 && add[pos] == seperator) pos++; - n = malloc(l1 + (l2-pos) + 2); + n = (char*)malloc(l1 + (l2-pos) + 2); memcpy(n,base,l1); n[l1]=seperator; strcpy(&n[l1+1],&add[pos]);