From de22dec56b1cc46b56a225d863080f7067312980 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sun, 28 Sep 2014 20:28:56 -0400 Subject: [PATCH] Some fixes --- BSDmakefile | 2 ++ Makefile | 1 + hash.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BSDmakefile b/BSDmakefile index b34cb1e..44a742a 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -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++ diff --git a/Makefile b/Makefile index 207e910..530bd4c 100644 --- 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 41d77bf..01a0d92 100644 --- 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); -- 2.39.2