]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/hash.c
Annotate "fall through" cases to silence warnings
[ngircd-alex.git] / src / ngircd / hash.c
index 3c600384b6b2f034a2d3f3455ad07a20e21d639e..c078443bbd0c2168ceb68b0690ef482eeb5a1739 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * Hash calculation
  */
 
-#include "imp.h"
 #include <assert.h>
 #include <string.h>
 
 #include "defines.h"
 #include "tool.h"
 
-#include "exp.h"
 #include "hash.h"
 
 static UINT32 jenkins_hash PARAMS((UINT8 *k, UINT32 length, UINT32 initval));
@@ -110,16 +108,27 @@ jenkins_hash(UINT8 *k, UINT32 length, UINT32 initval)
 
        {
                case 12: c+=((UINT32)k[11])<<24;
+               /* fall through */
                case 11: c+=((UINT32)k[10]<<16);
+               /* fall through */
                case 10: c+=((UINT32)k[9]<<8);
+               /* fall through */
                case 9 : c+=k[8];
+               /* fall through */
                case 8 : b+=((UINT32)k[7]<<24);
+               /* fall through */
                case 7 : b+=((UINT32)k[6]<<16);
+               /* fall through */
                case 6 : b+=((UINT32)k[5]<<8);
+               /* fall through */
                case 5 : b+=k[4];
+               /* fall through */
                case 4 : a+=((UINT32)k[3]<<24);
+               /* fall through */
                case 3 : a+=((UINT32)k[2]<<16);
+               /* fall through */
                case 2 : a+=((UINT32)k[1]<<8);
+               /* fall through */
                case 1 : a+=k[0];
                         break;
                case 0 : return c;