Skip to content

[PWGCF] DptDpt - Fixing Megalinter cppcheck warnings - #17990

Merged
victor-gonzalez merged 1 commit into
AliceO2Group:masterfrom
victor-gonzalez:master
Sep 20, 2026
Merged

victor-gonzalez merged 1 commit into
AliceO2Group:masterfrom
victor-gonzalez:master

Conversation

@victor-gonzalez

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 0 warnings, 🔕 2 disabled

@victor-gonzalez

Copy link
Copy Markdown
Collaborator Author

@vkucera, in my view, the staying MegaLinter failure is due to cppcheck false positives. The templated functions are explicitly instantiated for the different kind of data and there are default ones for unexpected kinds. cppcheck only considers the default ones and, wrongly, assigns their behaviors to the others.

In any case, I fixed a few warnings which were actual errors which would have been manifested with certain configurations. The tool is extremely useful.

@victor-gonzalez
victor-gonzalez enabled auto-merge (squash) September 20, 2026 22:01

@alibuild alibuild left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approving on behalf of @victor-gonzalez.

@victor-gonzalez
victor-gonzalez merged commit 2bbd72e into AliceO2Group:master Sep 20, 2026
14 of 15 checks passed
@vkucera

vkucera commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Hi @victor-gonzalez , thanks for the fixes and for reporting the false positives. I suspect one reason is that Cppcheck cannot know that LOGF(fatal aborts the processing.

@victor-gonzalez

Copy link
Copy Markdown
Collaborator Author

Hi @victor-gonzalez , thanks for the fixes and for reporting the false positives. I suspect one reason is that Cppcheck cannot know that LOGF(fatal aborts the processing.

My guess is that it is not able to properly track explicit template instantiations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants