Skip to content

[Trigger] Fix unused variables, parameters, values - #18640

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

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

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, ⚠️ 33 warnings, 🔕 0 disabled

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

alibuild commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 766a44d at 2026-11-08 00:14:

## 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 12 errors and 66 warnings.'
Found 12 errors and 66 warnings.
++ [[ 12 -gt 0 ]]
++ cat /sw/BUILD/c5d67c3fed0725ba7efca0d7b31550aa39d0489c/O2Physics-code-check/errors.txt
EventFiltering/macros/checkBCRange.C:17:1: error: included header TList.h is not used directly [misc-include-cleaner,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:162:30: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:224:21: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:252:30: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:268:17: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:410:29: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:452:23: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:460:32: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:476:19: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:560:21: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/checkBCrangesSkimming.C:682:29: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [clang-diagnostic-sign-compare,-warnings-as-errors]
EventFiltering/macros/uploadOTSobjects.C:68:5: error: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation,-warnings-as-errors]
++ [[ 66 -gt 0 ]]
++ cat /sw/BUILD/c5d67c3fed0725ba7efca0d7b31550aa39d0489c/O2Physics-code-check/warnings.txt
EventFiltering/macros/checkBCRange.C:42:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
EventFiltering/macros/checkBCRange.C:43:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
EventFiltering/macros/checkBCRange.C:50:15: warning: variable 'bcstart' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:50:24: warning: variable 'bcend' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:50:31: warning: variable 'globalBCId' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:50:43: warning: variable 'evSelBC' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:62:29: warning: statement should be inside braces [readability-braces-around-statements]
EventFiltering/macros/checkBCRange.C:89:14: warning: implicit conversion 'Relation' -> 'bool' [readability-implicit-bool-conversion]
EventFiltering/macros/checkBCRange.C:96:19: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
EventFiltering/macros/checkBCRange.C:102:62: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion]
EventFiltering/macros/checkBCRange.C:122:15: warning: variable 'bcstart' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:122:24: warning: variable 'bcend' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:137:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
EventFiltering/macros/checkBCRange.C:142:15: warning: variable 'globalBCId' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:142:27: warning: variable 'evSelBC' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:151:29: warning: statement should be inside braces [readability-braces-around-statements]
EventFiltering/macros/checkBCRange.C:166:12: warning: implicit conversion 'Relation' -> 'bool' [readability-implicit-bool-conversion]
EventFiltering/macros/checkBCRange.C:174:17: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
EventFiltering/macros/checkBCRange.C:177:8: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion]
EventFiltering/macros/checkBCRange.C:199:15: warning: variable 'bcstart' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:199:24: warning: variable 'bcend' is not initialized [cppcoreguidelines-init-variables]
EventFiltering/macros/checkBCRange.C:221:15: warning: variable 'bcId' is not initialized [cppcoreguidelines-init-variables]
[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/staging for 766a44d at 2026-11-07 19:19:

## 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/o2 for 766a44d at 2026-11-07 19:21:

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

Development

Successfully merging this pull request may close these issues.

2 participants