test/crypto: fix minsize build
authorThomas Monjalon <thomas@monjalon.net>
Sun, 8 Aug 2021 12:51:37 +0000 (14:51 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 15 Sep 2021 15:12:29 +0000 (17:12 +0200)
Error occurs when configuring meson with --buildtype=minsize
with GCC 11.1.0:

app/test/test_cryptodev_blockcipher.c:1133:45: error:
‘blk_tcs’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
|         const struct blockcipher_test_case *blk_tcs;
|                                             ^~~~~~~

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
app/test/test_cryptodev_blockcipher.c

index 1c948eb..3cdb2c9 100644 (file)
@@ -1183,7 +1183,7 @@ build_blockcipher_test_suite(enum blockcipher_test_type test_type)
                ts_setup = authonly_setup;
                break;
        default:
-               break;
+               return NULL;
        }
 
        ts = calloc(1, sizeof(struct unit_test_suite) +