nfctype5: fix returning uninitialized stack value in t5_tag_is_ti_pro()
The return value was not initialized so if tag was not matching, random
stack value (usually true) was returned instead of false.
This fixes clang warning:
plugins/nfctype5.c:257:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if ((uid[5] == 0xc4) || (uid[5] == 0xc5))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
plugins/nfctype5.c:261:9: note: uninitialized use occurs here
return ret;
^~~
plugins/nfctype5.c:257:2: note: remove the 'if' if its condition is always true
if ((uid[5] == 0xc4) || (uid[5] == 0xc5))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
plugins/nfctype5.c:248:10: note: initialize the variable 'ret' to silence this warning
bool ret;
^
= false
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
1 file changed