From 3f7ccca917bc2638baef08ada865f4ba87768035 Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Mon, 31 Jul 2017 01:31:38 +0000 Subject: [PATCH] libratbox/src/crypt.c: misc cleanup for compiler warnings crypt.c:49:4: warning: 'break' will never be executed [-Wunreachable-code-break] (... and 3 more of the same) crypt.c:627:7: warning: variable 'f' may be uninitialized when used here [-Wconditional-uninitialized] crypt.c:539:12: note: initialize the variable 'f' to silence this warning --- libratbox/src/crypt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libratbox/src/crypt.c b/libratbox/src/crypt.c index f2b09efd..e9b26555 100644 --- a/libratbox/src/crypt.c +++ b/libratbox/src/crypt.c @@ -46,16 +46,12 @@ rb_crypt(const char *key, const char *salt) { case '1': return rb_md5_crypt(key, salt); - break; case '5': return rb_sha256_crypt(key, salt); - break; case '6': return rb_sha512_crypt(key, salt); - break; default: return NULL; - break; }; } else @@ -536,7 +532,7 @@ rb_do_des(uint32_t l_in, uint32_t r_in, uint32_t *l_out, uint32_t *r_out, int co * l_in, r_in, l_out, and r_out are in pseudo-"big-endian" format. */ uint32_t l, r, *kl, *kr, *kl1, *kr1; - uint32_t f, r48l, r48r; + uint32_t f = 0, r48l, r48r; int round; if(count == 0)