Skip to content

[gcc] Don't emit a missing gcc warning if no checkers are enabled#4179

Merged
bruntib merged 1 commit into
Ericsson:masterfrom
Szelethus:gcc_no_warning_if_no_checker
Mar 5, 2024
Merged

[gcc] Don't emit a missing gcc warning if no checkers are enabled#4179
bruntib merged 1 commit into
Ericsson:masterfrom
Szelethus:gcc_no_warning_if_no_checker

Conversation

@Szelethus
Copy link
Copy Markdown
Contributor

Currently, no gcc checkers are enabled by default, which can make this warning rather annoying:

CodeChecker analyze ./compile_commands.json -o reports_test
[WARNING 2024-01-08 14:56] - Analyzer 'gcc' is enabled but CodeChecker is failed to execute analysis with it: 'Incompatible version: GCC binary found is too old at v9.4.0; minimum version is 13.0.0. Maybe try setting an absolute path to a different analyzer binary via the env variable CC_ANALYZER_BIN?'. Please check your 'PATH' environment variable and the 'config/package_layout.json' file!

...even though no checkers were explicitly enabled for gcc. This patch fixes this by disregarding non-functional analyzers if no checkers are enabled for them anyway.

@Szelethus Szelethus added bugfix 🔨 gcc 🐃 GNU GCC Static Analyzer labels Mar 4, 2024
@Szelethus Szelethus added this to the release 6.24.0 milestone Mar 4, 2024
@bruntib bruntib merged commit fa1d14f into Ericsson:master Mar 5, 2024
Szelethus added a commit to Szelethus/codechecker that referenced this pull request May 8, 2024
Original patch (that itroduces the crash):
Ericsson#4179
Revert attempt in Ericsson#4238.

The crash occurs because the original patch tries to create config
handlers even if they are not supported. This is playing with fire
already, but the crash occured when not even the analyzer binary is
found.

In this patch, these analyzers are skipped from checking if they have
any checkers enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix 🔨 gcc 🐃 GNU GCC Static Analyzer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants