Skip to content

Fix clang warnings.#55

Merged
tmadlener merged 1 commit into
iLCSoft:masterfrom
scott-snyder:clang-20260406
Apr 9, 2026
Merged

Fix clang warnings.#55
tmadlener merged 1 commit into
iLCSoft:masterfrom
scott-snyder:clang-20260406

Conversation

@scott-snyder
Copy link
Copy Markdown
Contributor

Unused variables/members.
Precision loss in int->float conversion.

BEGINRELEASENOTES

  • Fix some warnings seen when compiling with clang.
    ENDRELEASENOTES

bool alreadyCollected = false;

float ESumCalorimeterHits = 0.0; // accumulated energy of calorimeter hits where the track contributes
//float ESumCalorimeterHits = 0.0; // accumulated energy of calorimeter hits where the track contributes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have a preference for simply removing these instead of leaving them here as comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't remove those entirely because they're referenced later on in code that's already commented out (generally in debugging printouts.)
So this is just making things consistent.
If you prefer, we can just remove the commented-out debugging code as well and thus all traces of these identifiers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Let's leave them there then and not rock the boat too much ;)

Comment thread source/src/MarlinCED.cc


int count_lines=0;
//int count_lines=0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Comment thread source/src/MarlinUtil.cc

bool endOfFile = false;
unsigned int numberOfLines = 0;
//unsigned int numberOfLines = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Unused variables/members.
Precision loss in int->float conversion.
@tmadlener tmadlener enabled auto-merge (squash) April 9, 2026 16:32
@tmadlener tmadlener disabled auto-merge April 9, 2026 16:37
@tmadlener tmadlener merged commit 53c96b3 into iLCSoft:master Apr 9, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants