Skip to content

[ALICE3] Fix CodeCheck errors in alice3DQTableMaker - #17305

Open
axti98 wants to merge 4 commits into
AliceO2Group:masterfrom
axti98:CodeCheckerCleanup
Open

[ALICE3] Fix CodeCheck errors in alice3DQTableMaker#17305
axti98 wants to merge 4 commits into
AliceO2Group:masterfrom
axti98:CodeCheckerCleanup

Conversation

@axti98

@axti98 axti98 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the alice3 label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

@njacazio
njacazio marked this pull request as ready for review August 3, 2026 19:24
@njacazio
njacazio enabled auto-merge (squash) August 3, 2026 19:25
@alibuild

alibuild commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for ff0ec26 at 2026-08-05 11:23:

## sw/BUILD/O2-latest/log
CMake Error in Detectors/Base/CMakeLists.txt:

Full log here.

Comment thread ALICE3/TableProducer/alice3DqTableMaker.cxx Outdated
@vkucera

vkucera commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What is CodeCleaner?

@alibuild

alibuild commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for ff0ec26 at 2026-08-05 10:32:

## sw/BUILD/O2-latest/log
CMake Error in Detectors/Base/CMakeLists.txt:

Full log here.

@axti98 axti98 changed the title [ALICE3] Fix CodeCleaner errors in alice3DQTableMaker [ALICE3] Fix Code-Checker errors in alice3DQTableMaker Aug 5, 2026
@axti98 axti98 changed the title [ALICE3] Fix Code-Checker errors in alice3DQTableMaker [ALICE3] Fix CodeCheck errors in alice3DQTableMaker Aug 5, 2026
auto-merge was automatically disabled August 5, 2026 15:53

Head branch was pushed to by a user without write access

@alibuild

alibuild commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for f5f2e0e at 2026-08-07 21:22:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 2 errors and 2 warnings.'
Found 2 errors and 2 warnings.
++ [[ 2 -gt 0 ]]
++ cat /sw/BUILD/cda5ecd2ff74e692161e7b509d2e23b6eb74e8cd/O2Physics-code-check/errors.txt
ALICE3/TableProducer/alice3DqTableMaker.cxx:312:67: error: narrowing conversion from 'double' to 'Int_t' (aka 'int') [bugprone-narrowing-conversions,-warnings-as-errors]
ALICE3/TableProducer/alice3DqTableMaker.cxx:446:50: error: 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,-warnings-as-errors]
++ [[ 2 -gt 0 ]]
++ cat /sw/BUILD/cda5ecd2ff74e692161e7b509d2e23b6eb74e8cd/O2Physics-code-check/warnings.txt
ALICE3/TableProducer/alice3DqTableMaker.cxx:143:35: warning: statement should be inside braces [readability-braces-around-statements]
ALICE3/TableProducer/alice3DqTableMaker.cxx:617:31: warning: statement should be inside braces [readability-braces-around-statements]
++ [[ 2 -gt 0 ]]
++ exit 1
--

Full log here.

fMCFlags.clear();

uint16_t mcflags = static_cast<uint16_t>(0); // flags which will hold the decisions for each MC signal
auto mcflags = static_cast<uint16_t>(0); // flags which will hold the decisions for each MC signal

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.

Keep it simple.

Suggested change
auto mcflags = static_cast<uint16_t>(0); // flags which will hold the decisions for each MC signal
uint16_t mcflags{0}; // flags which will hold the decisions for each MC signal

@axti98
axti98 requested a review from vkucera August 9, 2026 14:42
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.

3 participants