Module Name: src Committed By: mrg Date: Mon Feb 4 08:23:53 UTC 2019
Modified Files: src/sys/crypto/blowfish: bf_locl.h src/sys/crypto/des: des_locl.h Log Message: add fallthru comments. i considered patching makefiles to ignore these problems, but this code is dead upstream and likely will be removed here rather than ever updated. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/crypto/blowfish/bf_locl.h cvs rdiff -u -r1.4 -r1.5 src/sys/crypto/des/des_locl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/crypto/blowfish/bf_locl.h diff -u src/sys/crypto/blowfish/bf_locl.h:1.5 src/sys/crypto/blowfish/bf_locl.h:1.6 --- src/sys/crypto/blowfish/bf_locl.h:1.5 Tue Jun 30 13:14:40 2009 +++ src/sys/crypto/blowfish/bf_locl.h Mon Feb 4 08:23:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bf_locl.h,v 1.5 2009/06/30 13:14:40 pooka Exp $ */ +/* $NetBSD: bf_locl.h,v 1.6 2019/02/04 08:23:53 mrg Exp $ */ /* $KAME: bf_locl.h,v 1.5 2000/08/31 06:03:48 itojun Exp $ */ /* crypto/bf/bf_local.h */ @@ -78,14 +78,14 @@ c+=n; \ l1=l2=0; \ switch (n) { \ - case 8: l2 =((BF_LONG)(*(--(c))))<<24L; \ - case 7: l2|=((BF_LONG)(*(--(c))))<<16L; \ - case 6: l2|=((BF_LONG)(*(--(c))))<< 8L; \ - case 5: l2|=((BF_LONG)(*(--(c)))); \ - case 4: l1 =((BF_LONG)(*(--(c))))<<24L; \ - case 3: l1|=((BF_LONG)(*(--(c))))<<16L; \ - case 2: l1|=((BF_LONG)(*(--(c))))<< 8L; \ - case 1: l1|=((BF_LONG)(*(--(c)))); \ + case 8: l2 =((BF_LONG)(*(--(c))))<<24L; /* FALLTHROUGH */ \ + case 7: l2|=((BF_LONG)(*(--(c))))<<16L; /* FALLTHROUGH */ \ + case 6: l2|=((BF_LONG)(*(--(c))))<< 8L; /* FALLTHROUGH */ \ + case 5: l2|=((BF_LONG)(*(--(c)))); /* FALLTHROUGH */ \ + case 4: l1 =((BF_LONG)(*(--(c))))<<24L; /* FALLTHROUGH */ \ + case 3: l1|=((BF_LONG)(*(--(c))))<<16L; /* FALLTHROUGH */ \ + case 2: l1|=((BF_LONG)(*(--(c))))<< 8L; /* FALLTHROUGH */ \ + case 1: l1|=((BF_LONG)(*(--(c)))); /* FALLTHROUGH */ \ } \ } @@ -100,14 +100,14 @@ #define l2cn(l1,l2,c,n) { \ c+=n; \ switch (n) { \ - case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \ - case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \ - case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \ - case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ - case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \ - case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \ - case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \ - case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ + case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); /* FALLTHROUGH */ \ + case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); /* FALLTHROUGH */ \ + case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); /* FALLTHROUGH */ \ + case 5: *(--(c))=(unsigned char)(((l2) )&0xff); /* FALLTHROUGH */ \ + case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); /* FALLTHROUGH */ \ + case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); /* FALLTHROUGH */ \ + case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); /* FALLTHROUGH */ \ + case 1: *(--(c))=(unsigned char)(((l1) )&0xff); /* FALLTHROUGH */ \ } \ } @@ -116,14 +116,14 @@ c+=n; \ l1=l2=0; \ switch (n) { \ - case 8: l2 =((BF_LONG)(*(--(c)))) ; \ - case 7: l2|=((BF_LONG)(*(--(c))))<< 8; \ - case 6: l2|=((BF_LONG)(*(--(c))))<<16; \ - case 5: l2|=((BF_LONG)(*(--(c))))<<24; \ - case 4: l1 =((BF_LONG)(*(--(c)))) ; \ - case 3: l1|=((BF_LONG)(*(--(c))))<< 8; \ - case 2: l1|=((BF_LONG)(*(--(c))))<<16; \ - case 1: l1|=((BF_LONG)(*(--(c))))<<24; \ + case 8: l2 =((BF_LONG)(*(--(c)))) ; /* FALLTHROUGH */ \ + case 7: l2|=((BF_LONG)(*(--(c))))<< 8; /* FALLTHROUGH */ \ + case 6: l2|=((BF_LONG)(*(--(c))))<<16; /* FALLTHROUGH */ \ + case 5: l2|=((BF_LONG)(*(--(c))))<<24; /* FALLTHROUGH */ \ + case 4: l1 =((BF_LONG)(*(--(c)))) ; /* FALLTHROUGH */ \ + case 3: l1|=((BF_LONG)(*(--(c))))<< 8; /* FALLTHROUGH */ \ + case 2: l1|=((BF_LONG)(*(--(c))))<<16; /* FALLTHROUGH */ \ + case 1: l1|=((BF_LONG)(*(--(c))))<<24; /* FALLTHROUGH */ \ } \ } @@ -131,14 +131,14 @@ #define l2nn(l1,l2,c,n) { \ c+=n; \ switch (n) { \ - case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \ - case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \ - case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \ - case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \ - case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \ - case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \ - case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \ - case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \ + case 8: *(--(c))=(unsigned char)(((l2) )&0xff); /* FALLTHROUGH */ \ + case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); /* FALLTHROUGH */ \ + case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); /* FALLTHROUGH */ \ + case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); /* FALLTHROUGH */ \ + case 4: *(--(c))=(unsigned char)(((l1) )&0xff); /* FALLTHROUGH */ \ + case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); /* FALLTHROUGH */ \ + case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); /* FALLTHROUGH */ \ + case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); /* FALLTHROUGH */ \ } \ } Index: src/sys/crypto/des/des_locl.h diff -u src/sys/crypto/des/des_locl.h:1.4 src/sys/crypto/des/des_locl.h:1.5 --- src/sys/crypto/des/des_locl.h:1.4 Sun Sep 9 11:01:02 2001 +++ src/sys/crypto/des/des_locl.h Mon Feb 4 08:23:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: des_locl.h,v 1.4 2001/09/09 11:01:02 tls Exp $ */ +/* $NetBSD: des_locl.h,v 1.5 2019/02/04 08:23:53 mrg Exp $ */ /* $KAME: des_locl.h,v 1.6 2000/11/06 13:58:09 itojun Exp $ */ /* crypto/des/des_locl.h */ @@ -76,14 +76,14 @@ c+=n; \ l1=l2=0; \ switch (n) { \ - case 8: l2 =((DES_LONG)(*(--(c))))<<24L; \ - case 7: l2|=((DES_LONG)(*(--(c))))<<16L; \ - case 6: l2|=((DES_LONG)(*(--(c))))<< 8L; \ - case 5: l2|=((DES_LONG)(*(--(c)))); \ - case 4: l1 =((DES_LONG)(*(--(c))))<<24L; \ - case 3: l1|=((DES_LONG)(*(--(c))))<<16L; \ - case 2: l1|=((DES_LONG)(*(--(c))))<< 8L; \ - case 1: l1|=((DES_LONG)(*(--(c)))); \ + case 8: l2 =((DES_LONG)(*(--(c))))<<24L; /* FALLTHROUGH */\ + case 7: l2|=((DES_LONG)(*(--(c))))<<16L; /* FALLTHROUGH */\ + case 6: l2|=((DES_LONG)(*(--(c))))<< 8L; /* FALLTHROUGH */\ + case 5: l2|=((DES_LONG)(*(--(c)))); /* FALLTHROUGH */\ + case 4: l1 =((DES_LONG)(*(--(c))))<<24L; /* FALLTHROUGH */\ + case 3: l1|=((DES_LONG)(*(--(c))))<<16L; /* FALLTHROUGH */\ + case 2: l1|=((DES_LONG)(*(--(c))))<< 8L; /* FALLTHROUGH */\ + case 1: l1|=((DES_LONG)(*(--(c)))); /* FALLTHROUGH */\ } \ } @@ -110,14 +110,14 @@ #define l2cn(l1,l2,c,n) { \ c+=n; \ switch (n) { \ - case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \ - case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \ - case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \ - case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ - case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \ - case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \ - case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \ - case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ + case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); /* FALLTHROUGH */\ + case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); /* FALLTHROUGH */\ + case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); /* FALLTHROUGH */\ + case 5: *(--(c))=(unsigned char)(((l2) )&0xff); /* FALLTHROUGH */\ + case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); /* FALLTHROUGH */\ + case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); /* FALLTHROUGH */\ + case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); /* FALLTHROUGH */\ + case 1: *(--(c))=(unsigned char)(((l1) )&0xff); /* FALLTHROUGH */\ } \ }