Description of problem: I run cppcheck in a project that contains a file generated by flex which I want cppcheck to ignore. That's why I use the '-i' option. With the new version of cppcheck (2.15.0) issues in the ignored file are reported. Version-Release number of selected component (if applicable): 2.15.0-1.fc40 How reproducible: 100% (in the project) Steps to Reproduce: 1. git clone https://github.com/cfengine/core.git 2. cd core 3. ./autogen.sh 4. make 5. cppcheck --quiet -j4 --error-exitcode=1 ./ --suppressions-list=tests/static-check/cppcheck_suppressions.txt --check-level=exhaustive --include=config.h -I cf-serverd/ -I libpromises/ -I libcfnet/ -I libntech/libutils/ -i 3rdparty -i .github/codeql -i libntech/.lgtm -i tests -i libpromises/cf3lex.c Actual results: cf3lex.c:2370:2: warning: Possible null pointer dereference: b [nullPointer] ^ cf3lex.c:2263:18: note: Calling function 'yy_init_buffer', 1st argument '(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL' value is 0 ^ cf3lex.c:2370:2: note: Null pointer dereference ^ cf3lex.c:2371:2: warning: Possible null pointer dereference: b [nullPointer] ^ cf3lex.c:2263:18: note: Calling function 'yy_init_buffer', 1st argument '(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL' value is 0 ^ cf3lex.c:2371:2: note: Null pointer dereference ^ Expected results: No issues found. Additional info: This works as expected with both 2.13.0-3.fc40 and 2.14.2-1.fc40. It is a regression in 2.15.0. I tried things like './libpromises/cf3lex.c' or just 'cf3lex.c', but with no success. I also tried reproducing the issue in a simpler setup, but there it worked as expected: [vpodzime@vp-desktop cppcheck_test]$ cppcheck ./ Checking strdup_null.c ... strdup_null.c:5:5: error: Memory leak: copy [memleak] return 0; ^ strdup_null.c:4:25: error: Null pointer dereference [nullPointer] char *copy = strdup(NULL); ^ 1/2 files checked 18% done Checking strtok_test.c ... 2/2 files checked 100% done [vpodzime@vp-desktop cppcheck_test]$ cppcheck ./ -i strdup_null.c Checking strtok_test.c ...
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
https://sourceforge.net/p/cppcheck/discussion/development/thread/93ca50a740/
This message is a reminder that Fedora Linux 40 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '40'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 40 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13. Fedora Linux 40 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.