Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GCC11] Ignore used uninitialized warning in DTDigiSimLink #35114

Merged
merged 1 commit into from Sep 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions SimDataFormats/DigiSimLinks/src/DTDigiSimLink.cc
Expand Up @@ -22,11 +22,14 @@ DTDigiSimLink::DTDigiSimLink()
: theWire(0), theDigiNumber(0), theTDCBase(32), theCounts(0), theSimTrackId(0), theEventId(0) {}

DTDigiSimLink::ChannelType DTDigiSimLink::channel() const {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
ChannelPacking result;
result.wi = theWire;
result.num = theDigiNumber;
DTDigiSimLink::ChannelType* p_result = reinterpret_cast<DTDigiSimLink::ChannelType*>(&result);
return *p_result;
#pragma GCC diagnostic pop
}

int DTDigiSimLink::wire() const { return theWire; }
Expand Down