intel / intel-ipsec-mb

Intel(R) Multi-Buffer Crypto for IPSec
BSD 3-Clause "New" or "Revised" License
289 stars 87 forks source link

Fix gcc 10 warning #42

Closed kevintraynor closed 4 years ago

kevintraynor commented 4 years ago

gcc 10 on Fedora Rawhide reports a warning.

$ cat /etc/redhat-release Fedora release 33 (Rawhide)

$ gcc --version | head -1 gcc (GCC) 10.0.1 20200216 (Red Hat 10.0.1-0.8)

avx/kasumi_avx.c: In function ‘kasumi_f8_1_buffer_bit_avx’: ./include/kasumi_internal.h:845:48: warning: ‘safeOutBuf.b64’ may be used uninitialized in this function [-Wmaybe-uninitialized] 845 | c->b64[0] |= BSWAP64(safeOutBuf->b64 & ~swapMask); | ~~^~~~~ In file included from sse/kasumi_sse.c:32: sse/kasumi_sse.c: In function ‘kasumi_f8_1_buffer_bit_sse’: ./include/kasumi_internal.h:845:48: warning: ‘safeOutBuf.b64’ may be used uninitialized in this function [-Wmaybe-uninitialized] 845 | c->b64[0] |= BSWAP64(safeOutBuf->b64 & ~swapMask); | ~~^~~~~

Fix by intializing safeOutBuf.

Signed-off-by: Kevin Traynor ktraynor@redhat.com

as per commit message

Description

as per commit message

Affected parts

Motivation and Context

gcc 10 compilation

How Has This Been Tested?

compile tested with native gcc and clang on Fedora Rawhide.

Types of changes

Checklist:

tkanteck commented 4 years ago

Thanks Kevin! It is merged https://github.com/intel/intel-ipsec-mb/commit/44b512717e95258cb6c479d6229ab86a987414ac