Commit e374145e authored by Philip Carns's avatar Philip Carns
Browse files

hush new gcc warnings about switch fall through

- put comments in lookup3.c
- replace uthash.h with newer version
parent 1e5d4959
......@@ -194,9 +194,12 @@ uint32_t initval) /* the previous hash, or an arbitrary value */
switch(length) /* all the case statements fall through */
{
case 3 : c+=k[2];
/* FALLTHRU */
case 2 : b+=k[1];
/* FALLTHRU */
case 1 : a+=k[0];
final(a,b,c);
/* FALLTHRU */
case 0: /* case 0: nothing left to add */
break;
}
......@@ -240,9 +243,12 @@ uint32_t *pb) /* IN: more seed OUT: secondary hash value */
switch(length) /* all the case statements fall through */
{
case 3 : c+=k[2];
/* FALLTHRU */
case 2 : b+=k[1];
/* FALLTHRU */
case 1 : a+=k[0];
final(a,b,c);
/* FALLTHRU */
case 0: /* case 0: nothing left to add */
break;
}
......@@ -429,16 +435,27 @@ uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
switch(length) /* all the case statements fall through */
{
case 12: c+=((uint32_t)k[11])<<24;
/* FALLTHRU */
case 11: c+=((uint32_t)k[10])<<16;
/* FALLTHRU */
case 10: c+=((uint32_t)k[9])<<8;
/* FALLTHRU */
case 9 : c+=k[8];
/* FALLTHRU */
case 8 : b+=((uint32_t)k[7])<<24;
/* FALLTHRU */
case 7 : b+=((uint32_t)k[6])<<16;
/* FALLTHRU */
case 6 : b+=((uint32_t)k[5])<<8;
/* FALLTHRU */
case 5 : b+=k[4];
/* FALLTHRU */
case 4 : a+=((uint32_t)k[3])<<24;
/* FALLTHRU */
case 3 : a+=((uint32_t)k[2])<<16;
/* FALLTHRU */
case 2 : a+=((uint32_t)k[1])<<8;
/* FALLTHRU */
case 1 : a+=k[0];
break;
case 0 : return c;
......@@ -616,16 +633,27 @@ void hashlittle2(
switch(length) /* all the case statements fall through */
{
case 12: c+=((uint32_t)k[11])<<24;
/* FALLTHRU */
case 11: c+=((uint32_t)k[10])<<16;
/* FALLTHRU */
case 10: c+=((uint32_t)k[9])<<8;
/* FALLTHRU */
case 9 : c+=k[8];
/* FALLTHRU */
case 8 : b+=((uint32_t)k[7])<<24;
/* FALLTHRU */
case 7 : b+=((uint32_t)k[6])<<16;
/* FALLTHRU */
case 6 : b+=((uint32_t)k[5])<<8;
/* FALLTHRU */
case 5 : b+=k[4];
/* FALLTHRU */
case 4 : a+=((uint32_t)k[3])<<24;
/* FALLTHRU */
case 3 : a+=((uint32_t)k[2])<<16;
/* FALLTHRU */
case 2 : a+=((uint32_t)k[1])<<8;
/* FALLTHRU */
case 1 : a+=k[0];
break;
case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */
......@@ -748,16 +776,27 @@ uint32_t hashbig( const void *key, size_t length, uint32_t initval)
switch(length) /* all the case statements fall through */
{
case 12: c+=k[11];
/* FALLTHRU */
case 11: c+=((uint32_t)k[10])<<8;
/* FALLTHRU */
case 10: c+=((uint32_t)k[9])<<16;
/* FALLTHRU */
case 9 : c+=((uint32_t)k[8])<<24;
/* FALLTHRU */
case 8 : b+=k[7];
/* FALLTHRU */
case 7 : b+=((uint32_t)k[6])<<8;
/* FALLTHRU */
case 6 : b+=((uint32_t)k[5])<<16;
/* FALLTHRU */
case 5 : b+=((uint32_t)k[4])<<24;
/* FALLTHRU */
case 4 : a+=k[3];
/* FALLTHRU */
case 3 : a+=((uint32_t)k[2])<<8;
/* FALLTHRU */
case 2 : a+=((uint32_t)k[1])<<16;
/* FALLTHRU */
case 1 : a+=((uint32_t)k[0])<<24;
break;
case 0 : return c;
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment