Skip to content

Commit

Permalink
Merge pull request #35114 from smuzaffar/gcc11-ignore-DTDigiSimLink
Browse files Browse the repository at this point in the history
[GCC11] Ignore used uninitialized warning in DTDigiSimLink
  • Loading branch information
cmsbuild authored Sep 2, 2021
2 parents ab84da9 + 77d014d commit 81aa811
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SimDataFormats/DigiSimLinks/src/DTDigiSimLink.cc
Original file line number Diff line number Diff line change
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

0 comments on commit 81aa811

Please sign in to comment.