cppcheck 1.89 emits a false positive for lib/dns/spnego_asn1.c:
lib/dns/spnego_asn1.c:698:9: error: Uninitialized variable: data [uninitvar]
memset(data, 0, sizeof(*data));
^
lib/dns/spnego.c:1707:47: note: Calling function 'decode_NegTokenResp', 3rd argument '&resp' value is <Uninit>
ret = decode_NegTokenResp(buf + taglen, len, &resp, NULL);
^
lib/dns/spnego_asn1.c:698:9: note: Uninitialized variable: data
memset(data, 0, sizeof(*data));
^
This message started appearing with cppcheck 1.89 [1], but it will be
gone in the next release [2], so just suppress it for the time being.
[1] https://github.com/danmar/cppcheck/commit/
af214e8212efa303e664920a468de00ee0b1fe3d
[2] https://github.com/danmar/cppcheck/commit/
2595b826349a7ffbe1c958b806498b6e336bea33
size_t l;
int e;
+ /* cppcheck-suppress uninitvar */
memset(data, 0, sizeof(*data));
reallen = 0;
e = der_match_tag_and_length(p, len, ASN1_C_UNIV, CONS, UT_Sequence, &reallen, &l);