We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44e0ee1 commit 3676dc0Copy full SHA for 3676dc0
1 file changed
wolfcrypt/benchmark/benchmark.c
@@ -8940,6 +8940,11 @@ void bench_dh(int useDeviceID)
8940
WC_DECLARE_VAR(priv2, byte,
8941
BENCH_DH_PRIV_SIZE, HEAP_HINT);
8942
8943
+ /* old scan-build misfires -Wmaybe-uninitialized on these. */
8944
+ XMEMSET(pub, 0, sizeof(pub));
8945
+ XMEMSET(agree, 0, sizeof(agree));
8946
+ XMEMSET(priv, 0, sizeof(priv));
8947
+
8948
WC_CALLOC_ARRAY(dhKey, DhKey, BENCH_MAX_PENDING,
8949
sizeof(DhKey), HEAP_HINT);
8950
WC_ALLOC_ARRAY(pub, byte,
@@ -10348,6 +10353,11 @@ void bench_ecc(int useDeviceID, int curveId)
10348
10353
BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
10349
10354
#endif
10350
10355
10356
10357
+ XMEMSET(sig, 0, sizeof(sig));
10358
+ XMEMSET(digest, 0, sizeof(digest));
10359
+ XMEMSET(shared, 0, sizeof(shared));
10360
10351
10361
WC_CALLOC_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
10352
10362
sizeof(ecc_key), HEAP_HINT);
10363
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
0 commit comments