Skip to content

[PWGLF] Fix code-checker warnings - #17691

Merged
maciacco merged 6 commits into
AliceO2Group:masterfrom
njacazio:njacazio-patch-1-1
Sep 1, 2026
Merged

[PWGLF] Fix code-checker warnings#17691
maciacco merged 6 commits into
AliceO2Group:masterfrom
njacazio:njacazio-patch-1-1

Conversation

@njacazio

@njacazio njacazio commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot added the pwglf label Sep 1, 2026
@njacazio njacazio changed the title Njacazio patch 1 1 Fix code-checker warnings Sep 1, 2026
@github-actions github-actions Bot changed the title Fix code-checker warnings [PWGLF] Njacazio patch 1 1 Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

@github-actions github-actions Bot changed the title [PWGLF] Njacazio patch 1 1 [PWGLF] Fix code-checker warnings Sep 1, 2026
mpuccio
mpuccio previously approved these changes Sep 1, 2026
@mpuccio
mpuccio enabled auto-merge (squash) September 1, 2026 04:59
@mpuccio
mpuccio disabled auto-merge September 1, 2026 05:00
@njacazio

njacazio commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @mpuccio apologies ! I pushed some more fixes, now it should be fine

mpuccio
mpuccio previously approved these changes Sep 1, 2026
@mpuccio

mpuccio commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

No worries!

@mpuccio
mpuccio enabled auto-merge (squash) September 1, 2026 05:16
@alibuild

alibuild commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 43444b7 at 2026-09-01 09:23:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 42b74bc at 2026-09-01 10:09:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:527:3: error: control reaches end of non-void function [-Werror=return-type]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:622:3: error: control reaches end of non-void function [-Werror=return-type]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:622:3: error: control reaches end of non-void function [-Werror=return-type]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:527:3: error: control reaches end of non-void function [-Werror=return-type]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 42b74bc at 2026-09-01 10:27:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:527:3: error: control reaches end of non-void function [-Werror=return-type]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:622:3: error: control reaches end of non-void function [-Werror=return-type]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:622:3: error: control reaches end of non-void function [-Werror=return-type]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:527:3: error: control reaches end of non-void function [-Werror=return-type]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 42b74bc at 2026-09-01 10:36:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 20 errors and 222 warnings.'
Found 20 errors and 222 warnings.
++ [[ 20 -gt 0 ]]
++ cat /sw/BUILD/e5a7c232e697b48be460ead7631e3c11d0a68099/O2Physics-code-check/errors.txt
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:44:1: error: included header TMath.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:246:35: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:247:35: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:249:39: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:250:39: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:252:35: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:253:35: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:255:39: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:256:39: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:462:38: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:527:3: error: non-void function does not return a value in all control paths [clang-diagnostic-return-type,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:557:38: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:622:3: error: non-void function does not return a value in all control paths [clang-diagnostic-return-type,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:664:11: error: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:740:97: error: the parameter 'filepath' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:740:115: error: the parameter 'histname' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:747:23: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:752:27: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:757:25: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:762:29: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
++ [[ 222 -gt 0 ]]
++ cat /sw/BUILD/e5a7c232e697b48be460ead7631e3c11d0a68099/O2Physics-code-check/warnings.txt
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:451:17: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:457:17: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:466:15: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:472:15: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:480:15: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:486:15: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:499:17: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:505:17: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:515:13: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:521:13: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:546:17: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:552:17: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:561:15: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:567:15: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:575:15: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:581:15: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:594:17: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:600:17: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:610:13: warning: do not use 'else' after 'return' [readability-else-after-return]
PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx:616:13: warning: do not use 'else' after 'return' [readability-else-after-return]
[0 more errors; see full log]

Full log here.

@njacazio
njacazio marked this pull request as draft September 1, 2026 09:54
auto-merge was automatically disabled September 1, 2026 09:54

Pull request was converted to draft

@njacazio

njacazio commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks to @vkucera for suggesting me how to implement the fixes locally!

@njacazio
njacazio marked this pull request as ready for review September 1, 2026 10:29
@maciacco
maciacco enabled auto-merge (squash) September 1, 2026 12:36
@maciacco
maciacco merged commit 7310599 into AliceO2Group:master Sep 1, 2026
14 of 15 checks passed
@njacazio
njacazio deleted the njacazio-patch-1-1 branch September 1, 2026 14:07
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.

4 participants