Skip to content

[ALICE3] Fix code-check warnings - #17988

Merged
njacazio merged 13 commits into
AliceO2Group:masterfrom
njacazio:nj-a3-check-fixes-and-clean
Sep 21, 2026
Merged

njacazio merged 13 commits into
AliceO2Group:masterfrom
njacazio:nj-a3-check-fixes-and-clean

Conversation

@njacazio

Copy link
Copy Markdown
Collaborator
  • Remove legacy DelphesO2 LUT and Smearer
  • Fix code check warnings

@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown

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

@njacazio
njacazio marked this pull request as ready for review September 20, 2026 20:53
@njacazio
njacazio marked this pull request as draft September 20, 2026 20:57
@njacazio

Copy link
Copy Markdown
Collaborator Author

Waiting for #17989

@njacazio njacazio changed the title [ALICE3] cleanup DelphesO2 legacy code, fix warnings [ALICE3] Fix code-check warnings Sep 20, 2026
@njacazio
njacazio force-pushed the nj-a3-check-fixes-and-clean branch from b976fe5 to 9113965 Compare September 21, 2026 06:13
@njacazio
njacazio marked this pull request as ready for review September 21, 2026 06:13
@njacazio
njacazio enabled auto-merge (squash) September 21, 2026 06:13
alibuild
alibuild previously approved these changes Sep 21, 2026

@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 @njacazio.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 9113965 at 2026-09-21 10:33:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 4 errors and 24 warnings.'
Found 4 errors and 24 warnings.
++ [[ 4 -gt 0 ]]
++ cat /sw/BUILD/63ac152ff235a2a687618bc438db01dc8fd4e23d/O2Physics-code-check/errors.txt
ALICE3/Core/FlatLutEntry.cxx:32:17: error: unused variable 'kBinCenterOffset' [clang-diagnostic-unused-const-variable,-warnings-as-errors]
ALICE3/Core/FlatLutEntry.cxx:158:43: error: do not cast 'pointer' (aka 'const unsigned char *') to 'const lutHeader_t *' (aka 'const o2::fastsim::LutHeader *') through 'const void *'; use reinterpret_cast instead [bugprone-casting-through-void,-warnings-as-errors]
ALICE3/Core/FlatLutEntry.cxx:163:37: error: do not cast 'unsigned char *' to 'lutHeader_t *' (aka 'o2::fastsim::LutHeader *') through 'void *'; use reinterpret_cast instead [bugprone-casting-through-void,-warnings-as-errors]
ALICE3/Core/FlatLutEntry.cxx:223:56: error: do not cast 'const uint8_t *' (aka 'const unsigned char *') to 'const lutHeader_t *' (aka 'const o2::fastsim::LutHeader *') through 'const void *'; use reinterpret_cast instead [bugprone-casting-through-void,-warnings-as-errors]
++ [[ 24 -gt 0 ]]
++ cat /sw/BUILD/63ac152ff235a2a687618bc438db01dc8fd4e23d/O2Physics-code-check/warnings.txt
ALICE3/Core/FlatLutEntry.cxx:147:10: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutEntry.cxx:153:10: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutEntry.cxx:253:25: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutEntry.cxx:264:13: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutEntry.cxx:289:13: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutWriter.cxx:269:17: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutWriter.cxx:364:25: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatTrackSmearer.cxx:173:25: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:497:16: warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:534:22: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:535:22: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:536:22: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:539:45: 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]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:539:59: 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]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:539:97: 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]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:828:7: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:829:7: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:830:7: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:831:24: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:840:24: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx:169:29: warning: initializer for member 'texName' is redundant [readability-redundant-member-init]
ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx:170:26: warning: initializer for member 'name' is redundant [readability-redundant-member-init]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:262:20: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:796:7: warning: switch has 2 consecutive identical branches [bugprone-branch-clone]
++ [[ 4 -gt 0 ]]
++ exit 1
--

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 2bcce46 at 2026-09-21 14:07:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 3 errors and 24 warnings.'
Found 3 errors and 24 warnings.
++ [[ 3 -gt 0 ]]
++ cat /sw/BUILD/3184124a5242703c66b0632ef26ab69de5419954/O2Physics-code-check/errors.txt
ALICE3/Core/FlatLutEntry.cxx:154:43: error: do not cast 'pointer' (aka 'const unsigned char *') to 'const lutHeader_t *' (aka 'const o2::fastsim::LutHeader *') through 'const void *'; use reinterpret_cast instead [bugprone-casting-through-void,-warnings-as-errors]
ALICE3/Core/FlatLutEntry.cxx:159:37: error: do not cast 'unsigned char *' to 'lutHeader_t *' (aka 'o2::fastsim::LutHeader *') through 'void *'; use reinterpret_cast instead [bugprone-casting-through-void,-warnings-as-errors]
ALICE3/Core/FlatLutEntry.cxx:219:56: error: do not cast 'const uint8_t *' (aka 'const unsigned char *') to 'const lutHeader_t *' (aka 'const o2::fastsim::LutHeader *') through 'const void *'; use reinterpret_cast instead [bugprone-casting-through-void,-warnings-as-errors]
++ [[ 24 -gt 0 ]]
++ cat /sw/BUILD/3184124a5242703c66b0632ef26ab69de5419954/O2Physics-code-check/warnings.txt
ALICE3/Core/FlatLutEntry.cxx:143:10: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutEntry.cxx:149:10: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutEntry.cxx:249:25: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutEntry.cxx:260:13: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutEntry.cxx:285:13: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutWriter.cxx:269:17: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatLutWriter.cxx:364:25: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/Core/FlatTrackSmearer.cxx:173:25: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:497:16: warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:534:22: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:535:22: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:536:22: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:539:45: 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]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:539:59: 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]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:539:97: 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]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:828:7: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:829:7: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:830:7: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:831:24: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx:840:24: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx:169:29: warning: initializer for member 'texName' is redundant [readability-redundant-member-init]
ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx:170:26: warning: initializer for member 'name' is redundant [readability-redundant-member-init]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:262:20: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
ALICE3/TableProducer/OTF/onTheFlyTracker.cxx:796:7: warning: switch has 2 consecutive identical branches [bugprone-branch-clone]
++ [[ 3 -gt 0 ]]
++ exit 1
--

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 2bcce46 at 2026-09-21 14:09:

No log files found

Full log here.

@njacazio
njacazio disabled auto-merge September 21, 2026 12:39
@njacazio
njacazio enabled auto-merge (squash) September 21, 2026 12:39

@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 @njacazio.

@njacazio
njacazio merged commit 4ca72cf into AliceO2Group:master Sep 21, 2026
13 of 15 checks passed
@njacazio
njacazio deleted the nj-a3-check-fixes-and-clean branch September 21, 2026 19:03
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