Skip to content

[PWGHF] Fix unused variables, parameters, values - #18643

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

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

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 added the pwghf PWG-HF label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

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

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

alibuild commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for ee73e84 at 2026-11-08 00:36:

## 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 19 errors and 35 warnings.'
Found 19 errors and 35 warnings.
++ [[ 19 -gt 0 ]]
++ cat /sw/BUILD/ba93fd1864520673c6de594de6349a7d60325ca0/O2Physics-code-check/errors.txt
PWGHF/HFC/Macros/FitCorrel.C:30:1: error: included header TText.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:125:35: error: comparison of integers of different signs: 'size_type' (aka 'unsigned long') and 'const int' [clang-diagnostic-sign-compare,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:150:26: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:153:18: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:153:31: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:154:27: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:154:40: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:155:31: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:155:44: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:166:35: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:166:47: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:177:18: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:178:18: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:179:18: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:180:18: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:181:18: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:182:15: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:183:26: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/FitCorrel.C:184:26: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
++ [[ 35 -gt 0 ]]
++ cat /sw/BUILD/ba93fd1864520673c6de594de6349a7d60325ca0/O2Physics-code-check/warnings.txt
PWGHF/HFC/Macros/FitCorrel.C:46:6: warning: variable 'removeNSPeakLowPt' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGHF/HFC/Macros/FitCorrel.C:82:3: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:83:33: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay]
PWGHF/HFC/Macros/FitCorrel.C:150:3: warning: do not declare C VLA arrays, use 'std::vector' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:153:3: warning: do not declare C VLA arrays, use 'std::vector' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:154:3: warning: do not declare C VLA arrays, use 'std::vector' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:155:3: warning: do not declare C VLA arrays, use 'std::vector' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:162:3: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:166:3: warning: do not declare C VLA arrays, use 'std::vector' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:170:9: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:171:9: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:172:9: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:173:9: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:174:9: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGHF/HFC/Macros/FitCorrel.C:177:3: warning: do not declare C VLA arrays, use 'std::vector' instead [modernize-avoid-c-arrays]
[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 ee73e84 at 2026-11-07 19:28:

## 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 ee73e84 at 2026-11-07 19:29:

## 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

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

2 participants