More fixes

This commit is contained in:
Dale Weiler 2012-12-20 08:45:54 +00:00
parent 9f742271b1
commit 3e8435783c
3 changed files with 3 additions and 4 deletions

View file

@ -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)

1
test.c
View file

@ -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];

4
util.c
View file

@ -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);