]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Fix gcc12 -fanalyzer warning
authorVitaly Chikunov <vt@altlinux.org>
Tue, 8 Feb 2022 08:31:54 +0000 (11:31 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Tue, 8 Feb 2022 09:06:41 +0000 (12:06 +0300)
GCC do not understand that `algname` cannot be NULL. Add dummy default case to
cover all execution paths.

Fixes https://github.com/gost-engine/engine/issues/389
Tested-by: Ilya Shipitsin <chipitsine@gmail.com>
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
test_sign.c

index 50b6643ef79286ad54a6b237d87ae68895210113..63ae3b56877d5ffdabcf88f52d2f737c672c7793 100644 (file)
@@ -121,6 +121,9 @@ static int test_sign(struct test_sign *t)
        case 512:
            type = NID_id_GostR3410_2012_512;
            algname = "gost2012_512";
+           break;
+       default:
+           return -1;
     }
 
     /* Keygen. */