intel / intel-ipsec-mb

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

lib/no-aesni/zuc_top_sse_no_aesni.c - variable L is being set and modified but not read #110

Closed ColinIanKing closed 1 year ago

ColinIanKing commented 1 year ago

Static analysis with cppcheck has found two uses of variable L where it is being set and modified but it is never read, suggesting it is redundant and can be removed.

lib/no-aesni/zuc_top_sse_no_aesni.c:857:28: style: Variable 'L' is assigned a value that is never used. [unreadVariable]
                uint32_t L = ((N + 31) / ZUC_WORD_BITS) -
                           ^
lib/no-aesni/zuc_top_sse_no_aesni.c:890:27: style: Variable 'L' is assigned a value that is never used. [unreadVariable]
                        L -= (keyStreamLengthInBits / 32);
pablodelara commented 1 year ago

Thanks @ColinIanKing. I will take a look at this!

tkanteck commented 1 year ago

ea5e82c7886ebdc6aa76c197731b612875a8d9cc fixes the problem

ColinIanKing commented 1 year ago

Thanks!