Skip to content

Conversation

@vkucera
Copy link
Collaborator

@vkucera vkucera commented Oct 8, 2025

Tagging code contributors for information and for double-checking.

  • PWGHF/D2H/Macros/runMassFitter.C @saganatt @pstahlhu @lubynets
    • Possible null pointer dereference
    • The if condition is the same as the previous if condition.
    • Parameter can be declared as const array.
  • PWGHF/D2H/Tasks/taskCharmPolarisation.cxx @Mingze129 @fgrosa
    • Variable is assigned a value that is never used.
    • float result is assigned to double variable. If the variable is double to avoid loss of information, then you have loss of information.
    • Redundant initialization. The initialized value is overwritten before it is read.
  • PWGHF/D2H/Tasks/taskSigmacToCascade.cxx @rutuparnarath
    • Variable is reassigned a value before the old one has been used.
  • PWGHF/HFC/Macros/DhCorrelationExtraction.cxx @scattaru
    • Possible null pointer dereference
    • Member variable is not initialized in the constructor.
    • Unused variable
    • Condition is always true.
    • Memory leaks. (5)
  • PWGHF/HFC/Macros/DhCorrelationFitter.cxx @scattaru
    • Member variable is not initialized in the constructor.
    • Member variable is not assigned a value in 'operator='.
    • Variable is assigned in constructor body. Consider performing initialization in initialization list.
    • Initializer order does not match the declaration order.
    • Many lines of dead code
    • Memory leaks. (3)
  • PWGHF/HFC/Macros/FitCorrel.C @scattaru
    • Variable can be declared as const array.
    • The if condition is the same as the previous if condition.
    • The scope of the variable can be reduced.
  • PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx @samrangy
    • Variable is reassigned a value before the old one has been used.
    • The scope of the variable can be reduced.
    • Variable is assigned a value that is never used.
    • Useless variables.
  • PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @scattaru
    • Variable is reassigned a value before the old one has been used.
    • The scope of the variable can be reduced.
    • Variable is assigned a value that is never used.
  • PWGHF/HFC/TableProducer/femtoDreamProducer.cxx @zhangbiao-phy
    • Condition is always true. (not fixed, only flagged)
  • PWGHF/HFC/Tasks/taskFlow.cxx @AlexianL
    • Struct member is never used.
    • Variable can be declared as const array.
  • PWGHF/Macros/computeFonllPlusPythiaPredictions.C @fgrosa
    • Function parameter should be passed by const reference.
  • PWGHF/TableProducer/candidateCreator2Prong.cxx
    • Useless mass... struct members.
  • PWGHF/TableProducer/candidateCreator3Prong.cxx
    • Useless mass... struct members.
  • PWGHF/TableProducer/candidateCreatorXicc.cxx
    • Struct member is never used.
    • The scope of the variable can be reduced.
  • PWGHF/TableProducer/candidateSelectorLc.cxx
    • Redundant initialization. The initialized value is overwritten before it is read.
  • PWGHF/TableProducer/candidateSelectorXicToPKPi.cxx
    • Redundant initialization. The initialized value is overwritten before it is read.
  • PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx
    • Redundant initialization. The initialized value is overwritten before it is read.
  • PWGHF/TableProducer/trackIndexSkimCreator.cxx @fgrosa
    • The if condition is the same as the previous if condition.
    • The scope of the variable can be reduced.
    • Variable is assigned a value that is never used.
  • PWGHF/Tasks/taskMcEfficiency.cxx
    • Function parameter should be passed by const reference.
  • PWGHF/Tasks/taskMcValidation.cxx @Marcellocosti @fgrosa @apalasciano @DelloStritto
    • Local variable shadows outer variable.
      • The line mcCollision = particle.mcCollision_as seems to duplicate what is done earlier. Please double-check.
    • Condition is always true.
    • Take table rows by const&.

vkucera added 29 commits October 8, 2025 11:06
@github-actions github-actions bot added the pwghf PWG-HF label Oct 8, 2025
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

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

@github-actions github-actions bot changed the title Cleanup and bug fixes using cppcheck and clang-tidy [PWGHF] Cleanup and bug fixes using cppcheck and clang-tidy Oct 8, 2025
@vkucera vkucera marked this pull request as ready for review October 8, 2025 13:55
@scattaru
Copy link
Contributor

scattaru commented Oct 9, 2025

Hi @vkucera,
I had a look at the code with my contribution and the new implementations seem fine for me.

Cheers,
Samuele

@vkucera
Copy link
Collaborator Author

vkucera commented Oct 9, 2025

Hi @vkucera, I had a look at the code with my contribution and the new implementations seem fine for me.

Cheers, Samuele

Thanks for checking, Samuele.

@vkucera vkucera enabled auto-merge (squash) October 9, 2025 13:51
Copy link
Collaborator

@alibuild alibuild left a comment

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

@vkucera vkucera merged commit 346c08b into AliceO2Group:master Oct 9, 2025
19 of 22 checks passed
@vkucera vkucera deleted the cppcheck-hf branch October 9, 2025 13:51
ArkaprabhaSaha001 pushed a commit to ArkaprabhaSaha001/O2Physics that referenced this pull request Oct 21, 2025
ThePhDane pushed a commit to ThePhDane/O2Physics that referenced this pull request Nov 3, 2025
lmattei01 pushed a commit to lmattei01/O2Physics that referenced this pull request Dec 5, 2025
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.

4 participants