[gnutls-devel] GnuTLS | gnutls_init: Always initialize *session (!1652)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Nov 2 14:52:38 CET 2022




Eric Blake commented on a discussion: https://gitlab.com/gnutls/gnutls/-/merge_requests/1652#note_1157399191

> There are a couple of failures in the CI; would you be able to pacify them?

I can try, even though they appear unrelated to my changes.

>
> The cppcheck issue seems to be false-positive:
> ```console
> 'invalidLifetime:lib/pkcs11_privkey.c:605,error,Using pointer to local variable 'tval' that is out of scope.'
> 'invalidLifetime:lib/pkcs11_privkey.c:607,error,Using pointer to local variable 'tval' that is out of scope.'
> ```
> as `tval` is only referenced inside the `if` block. Maybe using a separate attribute array than `a` would fix the issue, or we could add a suppression comment like `/* cppcheck-suppress invalidLifetime symbolName=tval */`.

This is code in a function I didn't touch.  But I think I see why
cppcheck complained, and added a patch that should pacify it.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1652#note_1157399191
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20221102/1851f400/attachment-0001.html>


More information about the Gnutls-devel mailing list