Fix a bogus clang warning
authorMatt Caswell <matt@openssl.org>
Thu, 22 Oct 2015 14:13:20 +0000 (15:13 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 30 Oct 2015 08:39:47 +0000 (08:39 +0000)
Clang with --strict-warnings was complaining about an uninitalised
variable. In reality it will never be used uninitialised but clang can't
figure out the logic, so just init it anyway to silence the warning.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl/statem/statem.c

index 76e902c..b9e6fc0 100644 (file)
@@ -522,7 +522,7 @@ static void init_read_state_machine(SSL *s)
 static SUB_STATE_RETURN read_state_machine(SSL *s) {
     OSSL_STATEM *st = &s->statem;
     int ret, mt;
-    unsigned long len;
+    unsigned long len = 0;
     int (*transition)(SSL *s, int mt);
     PACKET pkt;
     enum MSG_PROCESS_RETURN (*process_message)(SSL *s, PACKET *pkt);