From 1f62ce9c4df676189e4a176240376c8aa3e95934 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 28 Apr 2021 09:19:14 +0100 Subject: [PATCH] Explicitly cast frag buffers for BeOS. --- setter/src/beos/frag.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/setter/src/beos/frag.c b/setter/src/beos/frag.c index a7b9e3f..1ba61ae 100644 --- a/setter/src/beos/frag.c +++ b/setter/src/beos/frag.c @@ -80,7 +80,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(halfCluster); + buffer = (unsigned char*)malloc(halfCluster); memset(buffer, 0, halfCluster); for(i = 0; i < halfCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -102,7 +102,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(quarterCluster); + buffer = (unsigned char*)malloc(quarterCluster); memset(buffer, 0, quarterCluster); for(i = 0; i < quarterCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -125,7 +125,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(twoCluster); + buffer = (unsigned char*)malloc(twoCluster); memset(buffer, 0, twoCluster); for(i = 0; i < twoCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -147,7 +147,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(threeQuartersCluster); + buffer = (unsigned char*)malloc(threeQuartersCluster); memset(buffer, 0, threeQuartersCluster); for(i = 0; i < threeQuartersCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -174,7 +174,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(twoAndThreeQuartCluster); + buffer = (unsigned char*)malloc(twoAndThreeQuartCluster); memset(buffer, 0, twoAndThreeQuartCluster); for(i = 0; i < twoAndThreeQuartCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -201,7 +201,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(twoCluster); + buffer = (unsigned char*)malloc(twoCluster); memset(buffer, 0, twoCluster); for(i = 0; i < twoCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -223,7 +223,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(twoCluster); + buffer = (unsigned char*)malloc(twoCluster); memset(buffer, 0, twoCluster); for(i = 0; i < twoCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -245,7 +245,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(twoCluster); + buffer = (unsigned char*)malloc(twoCluster); memset(buffer, 0, twoCluster); for(i = 0; i < twoCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -271,7 +271,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(threeQuartersCluster); + buffer = (unsigned char*)malloc(threeQuartersCluster); memset(buffer, 0, threeQuartersCluster); for(i = 0; i < threeQuartersCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE]; @@ -305,7 +305,7 @@ void Fragmentation(const char* path, size_t clusterSize) if(h == NULL) { rc = errno; } else { - buffer = malloc(twoAndThreeQuartCluster); + buffer = (unsigned char*)malloc(twoAndThreeQuartCluster); memset(buffer, 0, twoAndThreeQuartCluster); for(i = 0; i < twoAndThreeQuartCluster; i++) buffer[i] = clauniaBytes[i % CLAUNIA_SIZE];