Skip to content

[PWGLF,PWGMM] Fix unused variables, parameters, values - #18646

Open
vkucera wants to merge 1 commit into
AliceO2Group:masterfrom
vkucera:clang-tidy-unused-PWGMM
Open

vkucera wants to merge 1 commit into
AliceO2Group:masterfrom
vkucera:clang-tidy-unused-PWGMM

Conversation

@vkucera

@vkucera vkucera commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes errors from the following Clang-Tidy categories:

  • clang-analyzer-deadcode.DeadStores
  • clang-diagnostic-unused-parameter
  • clang-diagnostic-unused-variable

Most errors are fixed temporarily by commenting out the unused bits and by adding a FIXME: unused comment.

The final fix is to either remove the unused bits or to fix the bugs which has to be done by someone who knows the intended behaviour.

Fixes errors from the following Clang-Tidy categories:

- `clang-analyzer-deadcode.DeadStores`
- `clang-diagnostic-unused-parameter`
- `clang-diagnostic-unused-variable`

Most errors are fixed temporarily by commenting out the unused bits and by adding a `FIXME: unused` comment.

The final fix is to either remove the unused bits or to fix the bugs which has to be done by someone who knows the intended behaviour.
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

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

@github-actions github-actions Bot changed the title Fix unused variables, parameters, values [PWGLF,PWGMM] Fix unused variables, parameters, values Nov 7, 2026
@vkucera
vkucera marked this pull request as ready for review November 7, 2026 18:09
@alibuild

alibuild commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for eeecbb1 at 2026-11-08 01:15:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'To reproduce the results below locally, run: '\''aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'\''.'
To reproduce the results below locally, run: 'aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'.
++ echo 'To apply all automatic fixes, add the '\''-e O2PHYSICS_CHECKER_FIX=1'\'' option.'
To apply all automatic fixes, add the '-e O2PHYSICS_CHECKER_FIX=1' option.
++ echo 'See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.'
See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.
++ echo 'Found 67 errors and 179 warnings.'
Found 67 errors and 179 warnings.
++ [[ 67 -gt 0 ]]
++ cat /sw/BUILD/8560e1a8ac669d96463c973a82279266b985eb13/O2Physics-code-check/errors.txt
PWGMM/Lumi/macros/merger.C:19:1: error: included header TList.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGMM/Lumi/macros/merger.C:58:32: error: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Lumi/macros/merger.C:58:32: error: do not use C-style cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-cstyle-cast,-warnings-as-errors]
PWGMM/Lumi/macros/merger.C:59:12: error: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Lumi/macros/merger.C:59:12: error: do not use C-style cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-cstyle-cast,-warnings-as-errors]
PWGMM/Lumi/macros/non_fac.C:53:9: error: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Lumi/macros/non_fac.C:53:9: error: do not use C-style cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-cstyle-cast,-warnings-as-errors]
PWGMM/Lumi/macros/non_fac.C:135:9: error: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Lumi/macros/non_fac.C:135:9: error: do not use C-style cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-cstyle-cast,-warnings-as-errors]
PWGMM/Mult/TableProducer/ambiguousTrackPropagation.cxx:164:41: 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]
PWGMM/Mult/TableProducer/ambiguousTrackPropagation.cxx:218:34: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/TableProducer/ambiguousTrackPropagation.cxx:218:67: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:370:43: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:370:60: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:381:44: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:381:61: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:382:47: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:382:64: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:382:104: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:475:43: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:505:51: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:505:96: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:507:53: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:507:98: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:508:53: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:508:98: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:511:53: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:511:98: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:512:53: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:512:98: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:599:47: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:599:64: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:644:53: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:644:70: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:644:113: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGMM/Mult/Tasks/dndeta-hi.cxx:645:50: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
[0 more errors; see full log]

Full log here.

@alibuild

alibuild commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for eeecbb1 at 2026-11-07 19:34:

## sw/BUILD/O2-latest/log
CMake Error at dependencies/FindFairRoot.cmake:68 (set_target_properties):
CMake Error at /sw/slc9_x86-64/CMake/v4.1.4-6/share/cmake-4.1/Modules/FeatureSummary.cmake:499 (message):

Full log here.

@alibuild

alibuild commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for eeecbb1 at 2026-11-07 19:35:

## sw/BUILD/O2-latest/log
CMake Error at dependencies/FindFairRoot.cmake:68 (set_target_properties):
CMake Error at /sw/slc9_x86-64/CMake/v4.1.4-6/share/cmake-4.1/Modules/FeatureSummary.cmake:499 (message):

Full log here.

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

Development

Successfully merging this pull request may close these issues.

3 participants