addaac42a0
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC cperf_test_verify.o
cperf_test_verify.c: In function ‘cperf_verify_op’:
cperf_test_verify.c:382:5: error: ‘auth’ may be used uninitialized
in this function
[-Werror=maybe-uninitialized]
if (auth == 1) {
^
cperf_test_verify.c:371:5: error: ‘cipher’ may be used uninitialized
in this function
[-Werror=maybe-uninitialized]
if (cipher == 1) {
^
cperf_test_verify.c:384:11: error: ‘auth_offset’ may be used
uninitialized in this function
[-Werror=maybe-uninitialized]
res += memcmp(data + auth_offset,
^~~~~~~~~~~~~~~~~~~~~~~~~~
vector->digest.data,
~~~~~~~~~~~~~~~~~~~~
options->digest_sz);
~~~~~~~~~~~~~~~~~~~
cperf_test_verify.c:377:11: error: ‘cipher_offset’ may be used
uninitialized in this function
[-Werror=maybe-uninitialized]
res += memcmp(data + cipher_offset,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vector->plaintext.data,
~~~~~~~~~~~~~~~~~~~~~~~
options->test_buffer_size);
~~~~~~~~~~~~~~~~~~~~~~~~~~
There is no default case in the switch statement, so if options->op_type
is an unknown value, the function will use uninitialized values. Fix it
by adding a default.
Fixes:
|
||
---|---|---|
.. | ||
pdump | ||
proc_info | ||
test-crypto-perf | ||
test-eventdev | ||
test-pmd | ||
Makefile |