https://bugzilla.redhat.com/show_bug.cgi?id=2217542
Bug ID: 2217542 Summary: cppcheck-2.11-1.fc39 fails on gettext.h with returnDanglingLifetime Product: Fedora Version: rawhide Hardware: x86_64 URL: https://github.com/rhinstaller/anaconda/actions/runs/5 378586167/jobs/9758588667#step:4:2099 OS: Linux Status: NEW Component: gettext Severity: medium Assignee: petersen@redhat.com Reporter: jkonecny@redhat.com QA Contact: extras-qa@fedoraproject.org CC: dueno@redhat.com, i18n-bugs@lists.fedoraproject.org, nphilipp@redhat.com, petersen@redhat.com, suanand@redhat.com Target Milestone: --- Classification: Fedora
On Rawhide cppcheck was recently updated and now we are getting returnDanglingLifetime error from it on copied gettext.h file from /usr/share/gettext/gettext.h path.
Version of cppcheck which shows this issue: 2.11-1.fc39 Last version of cppcheck which worked well: 2.9-4.fc38
I don't know if the error is valid or not...
Reproducible: Always
Steps to Reproduce: 1. podman run --rm -it fedora:rawhide 2. dnf install -y cppcheck gettext-devel 3. cppcheck -q -v /usr/share/gettext/gettext.h Actual Results: /usr/share/gettext/gettext.h:248:16: error: Returning pointer to local variable 'msg_ctxt_id' that will be invalid when returning. [returnDanglingLifetime] return translation;
Expected Results: No error