]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Some fixes
authorDale Weiler <weilercdale@gmail.com>
Mon, 29 Sep 2014 00:28:56 +0000 (20:28 -0400)
committerDale Weiler <weilercdale@gmail.com>
Mon, 29 Sep 2014 00:28:56 +0000 (20:28 -0400)
BSDmakefile
Makefile
hash.c

index b34cb1e7610c11a4215f29cbce9ff119d5a19e8e..44a742a138d7d9f524d718e53c5a7590fdf11b35 100644 (file)
@@ -21,6 +21,8 @@ GITINFO  :=
                 -Wno-unknown-warning-option\
                 -Wno-cast-align\
                 -Wno-assign-enum\
+                -Wno-empty-body\
+                -Wno-date-time\
                 -pedantic-errors
 .else
 .    if $(CC) != g++
index 207e910471305915fb31ab020c3f1ef633e26185..530bd4cd4ea42249b3315b14951ec65724b3e56a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ ifeq ($(CC), clang)
            -Wno-cast-align                    \
            -Wno-assign-enum                   \
            -Wno-empty-body                    \
+           -Wno-date-time                     \
            -pedantic-errors
 else
        ifneq ($(CC), g++)
diff --git a/hash.c b/hash.c
index 41d77bf9e31e11a6fe1b8685cec7c0b826d7db6a..01a0d924867e17a3f1a64631891e2980c39f1c78 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -314,12 +314,12 @@ static ASAN_DISABLE size_t hash_strlen(const char *key) {
     }
 
     VALGRIND_MAKE_MEM_DEFINED(s, STRLEN_ALIGN);
-    for (w = (const void *)s; !STRLEN_HASZERO(*w); w++) {
+    for (w = (const size_t *)s; !STRLEN_HASZERO(*w); w++) {
         /* Make the next word legal to access */
         VALGRIND_MAKE_MEM_DEFINED(w + STRLEN_ALIGN, STRLEN_ALIGN);
     }
 
-    for (s = (const void *)w; *s; s++);
+    for (s = (const char *)w; *s; s++);
 
     /* It's not legal to access this area anymore */
     VALGRIND_MAKE_MEM_NOACCESS(s + 1, STRLEN_ALIGN);