summaryrefslogtreecommitdiff
path: root/siphash.c
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-04-29 15:12:44 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-05-04 14:56:55 +0200
commit0764d323d8908c1682f3ab654c48783438a88a54 (patch)
treee335e7f8f9c3a4d8a6c14bdce81af07102244ad7 /siphash.c
parentfa7a712d460dc904f8a836bb22b54d457d95ba8e (diff)
Fix -Wundef warnings for patterns `#if HAVE`
* See [Feature #17752] * Using this to detect them: git grep -P 'if\s+HAVE' | grep -Pv 'HAVE_LONG_LONG|/ChangeLog|HAVE_TYPEOF'
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4428
Diffstat (limited to 'siphash.c')
-rw-r--r--siphash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/siphash.c b/siphash.c
index ddf8ee245d..2c48fa8496 100644
--- a/siphash.c
+++ b/siphash.c
@@ -180,7 +180,7 @@ int_sip_dump(sip_state *state)
int v;
for (v = 0; v < 4; v++) {
-#if HAVE_UINT64_T
+#ifdef HAVE_UINT64_T
printf("v%d: %" PRIx64 "\n", v, state->v[v]);
#else
printf("v%d: %" PRIx32 "%.8" PRIx32 "\n", v, state->v[v].hi, state->v[v].lo);
@@ -447,7 +447,7 @@ sip_hash13(const uint8_t key[16], const uint8_t *data, size_t len)
OR_BYTE(4);
case 4:
#if BYTE_ORDER == LITTLE_ENDIAN && UNALIGNED_WORD_ACCESS
- #if HAVE_UINT64_T
+ #ifdef HAVE_UINT64_T
last |= (uint64_t) ((uint32_t *) end)[0];
#else
last.lo |= ((uint32_t *) end)[0];