]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Another fix
authorDale Weiler <killfieldengine@gmail.com>
Thu, 20 Dec 2012 08:19:43 +0000 (08:19 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 20 Dec 2012 08:19:43 +0000 (08:19 +0000)
gmqcc.h
util.c

diff --git a/gmqcc.h b/gmqcc.h
index ee9853e6305e9fec4a6a040b663df2c7aca6ae48..234aaa9cfb28edbf36a4c7facd14a9ad977e274d 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
 #    define GMQCC_NORETURN
 #endif
 
 #    define GMQCC_NORETURN
 #endif
 
-/*
- * stdint.h and inttypes.h -less subset
- * for systems that don't have it, which we must
- * assume is all systems. (int8_t not required)
- */
+/* no stdint.h in < C99 */
 #if __STDC_VERSION__ < 199901L
 #   if   CHAR_MIN  == -128
         typedef unsigned char  uint8_t; /* same as below */
 #if __STDC_VERSION__ < 199901L
 #   if   CHAR_MIN  == -128
         typedef unsigned char  uint8_t; /* same as below */
diff --git a/util.c b/util.c
index 2ad288029880019dd070c9904e8a87c2eb9c8789..c3d3d4fa2d6cc9c220784c079122f146e508ff1f 100644 (file)
--- a/util.c
+++ b/util.c
@@ -534,7 +534,7 @@ typedef struct hash_node_t {
  */
 #ifdef __x86_64__
 GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, register size_t seed) {
  */
 #ifdef __x86_64__
 GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, register size_t seed) {
-    const uint64_t       mix   = 0xC6A4A7935BD1E995;
+    const uint64_t       mix   = 0xC6A4A7935BD1E995UL;
     const int            rot   = 47;
     size_t               size  = strlen(key);
     uint64_t             hash  = seed ^ (size - mix);
     const int            rot   = 47;
     size_t               size  = strlen(key);
     uint64_t             hash  = seed ^ (size - mix);