X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-hash-helper.h;h=36c3ae4274906ea96c26886bb81293fa405e9844;hb=8da9deee450bf62c6c3abb1f44f9414c0667dd6f;hp=6c8008a06fcf7fb1426ca85b13f5986fab62e52d;hpb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;p=lttng-ust.git diff --git a/liblttng-ust/lttng-hash-helper.h b/liblttng-ust/lttng-hash-helper.h index 6c8008a0..36c3ae42 100644 --- a/liblttng-ust/lttng-hash-helper.h +++ b/liblttng-ust/lttng-hash-helper.h @@ -43,7 +43,10 @@ do { \ c ^= b; c -= rot(b, 24); \ } -static inline __attribute__((unused)) +static inline +uint32_t lttng_hash_u32(const uint32_t *k, size_t length, uint32_t initval) + __attribute__((unused)); +static inline uint32_t lttng_hash_u32( const uint32_t *k, /* the key, an array of uint32_t values */ size_t length, /* the length of the key, in uint32_ts */ @@ -102,10 +105,10 @@ void lttng_hashword2( /*----------------------------------- handle the last 3 uint32_t's */ switch (length) { /* all the case statements fall through */ - case 3: c += k[2]; - case 2: b += k[1]; + case 3: c += k[2]; /* fall through */ + case 2: b += k[1]; /* fall through */ case 1: a += k[0]; - final(a, b, c); + final(a, b, c); /* fall through */ case 0: /* case 0: nothing left to add */ break; }