]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - util.c
Update doc/specification.tex
[xonotic/gmqcc.git] / util.c
diff --git a/util.c b/util.c
index 1810adfce16c94d710e063db835d5d15e21cd911..004b69b0d5daef6215a2e85d16a408607d8ea07c 100644 (file)
--- a/util.c
+++ b/util.c
@@ -616,7 +616,7 @@ static void util_hsupdate(hash_set_t *set) {
         set->bits ++;
         set->capacity = (size_t)(1 << set->bits);
         set->mask     = set->capacity - 1;
-        set->items    = mem_a(set->capacity * sizeof(size_t));
+        set->items    = (size_t*)mem_a(set->capacity * sizeof(size_t));
         set->total    = 0;
 
         /*assert(set->items);*/
@@ -680,14 +680,14 @@ int util_hshas(hash_set_t *set, void *item) {
 hash_set_t *util_hsnew(void) {
     hash_set_t *set;
 
-    if (!(set = mem_a(sizeof(hash_set_t))))
+    if (!(set = (hash_set_t*)mem_a(sizeof(hash_set_t))))
         return NULL;
 
     set->bits     = 3;
     set->total    = 0;
     set->capacity = (size_t)(1 << set->bits);
     set->mask     = set->capacity - 1;
-    set->items    = mem_a(set->capacity * sizeof(size_t));
+    set->items    = (size_t*)mem_a(set->capacity * sizeof(size_t));
 
     if (!set->items) {
         util_hsdel(set);
@@ -760,7 +760,7 @@ int util_vasprintf(char **dat, const char *fmt, va_list args) {
         }
 
         /* not large enough ... */
-        tmp = mem_a(len + 1);
+        tmp = (char*)mem_a(len + 1);
         if ((ret = vsnprintf(tmp, len + 1, fmt, args)) != len) {
             mem_d(tmp);
             *dat = NULL;