]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
More fixes
authorDale Weiler <killfieldengine@gmail.com>
Thu, 20 Dec 2012 08:45:54 +0000 (08:45 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 20 Dec 2012 08:45:54 +0000 (08:45 +0000)
Makefile
test.c
util.c

index a66b8116ffe39a648399cda5f91beb7d89718f4c..fe05bf5398682fc87daac297a2b5f5a6ee01b45d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ CYGWIN = $(findstring CYGWIN,  $(UNAME))
 MINGW  = $(findstring MINGW32, $(UNAME))
 
 CC     ?= clang
-CFLAGS += -Wall -Wextra -I. -pedantic-errors
+CFLAGS += -Wall -Wextra -I. -pedantic-errors -std=gnu99
 #turn on tons of warnings if clang is present
 # but also turn off the STUPID ONES
 ifeq ($(CC), clang)
diff --git a/test.c b/test.c
index 3ee745112e7a1c3acf6b38c853d804a511bd9430..6ca4fec8ca92ab1a06b1dd0beba7cf99f7d0dc47 100644 (file)
--- a/test.c
+++ b/test.c
@@ -50,7 +50,6 @@ char *task_bins[] = {
 #ifndef _WIN32
 #include <sys/types.h>
 #include <sys/wait.h>
-
 #include <unistd.h>
 typedef struct {
     FILE *handles[3];
diff --git a/util.c b/util.c
index c3d3d4fa2d6cc9c220784c079122f146e508ff1f..3961c74f81d996d3b28e41641fcbc2a3be57b376 100644 (file)
--- a/util.c
+++ b/util.c
@@ -533,7 +533,7 @@ typedef struct hash_node_t {
  * below.  These should be autovectorized by gcc.
  */
 #ifdef __x86_64__
-GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, register size_t seed) {
+static GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, size_t seed) {
     const uint64_t       mix   = 0xC6A4A7935BD1E995UL;
     const int            rot   = 47;
     size_t               size  = strlen(key);
@@ -575,7 +575,7 @@ GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, registe
 }
 
 #else
-GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, register size_t seed) {
+static GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, size_t seed) {
     const uint32_t       mix   = 0x5BD1E995;
     const uint32_t       rot   = 24;
     size_t               size  = strlen(key);