Skip to content

[GCC14] Fix compiler warnings #47556

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

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DataFormats/GEMDigi/interface/GEMOptoHybrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class GEMOptoHybrid {
};
};

GEMOptoHybrid() : ch_(0), ct_(0), existVFATs_(0) {}
GEMOptoHybrid() : ver_(0), ch_(0), ct_(0), existVFATs_(0) {}
~GEMOptoHybrid() { vfatd_.clear(); }

void setVersion(uint8_t i) { ver_ = i; }
Expand Down
14 changes: 8 additions & 6 deletions L1Trigger/GlobalMuonTrigger/src/L1MuGlobalMuonTrigger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ L1MuGlobalMuonTrigger::L1MuGlobalMuonTrigger(const edm::ParameterSet& ps) {
m_ExtendedCands.reserve(20);

// set configuration parameters
if (not m_config) {
if (!std::atomic_load(&m_config)) { // Atomically load m_config
auto temp = std::make_shared<L1MuGMTConfig>(ps);
std::shared_ptr<L1MuGMTConfig> empty;
std::atomic_compare_exchange_strong(&m_config, &empty, temp);
std::shared_ptr<L1MuGMTConfig> empty = nullptr; // Explicit nullptr for CAS
std::atomic_compare_exchange_strong_explicit(
&m_config, &empty, temp, std::memory_order_acq_rel, std::memory_order_acquire);
}
m_writeLUTsAndRegs = ps.getUntrackedParameter<bool>("WriteLUTsAndRegs", false);

Expand Down Expand Up @@ -122,10 +123,11 @@ L1MuGlobalMuonTrigger::L1MuGlobalMuonTrigger(const edm::ParameterSet& ps) {
edm::LogVerbatim("GMT_info") << "creating GMT Sorter";
m_Sorter = new L1MuGMTSorter(*this); // barrel

if (not m_db) {
if (!std::atomic_load(&m_db)) { // Atomically load m_db
auto temp = std::make_shared<L1MuGMTDebugBlock>(m_config->getBxMin(), m_config->getBxMax());
std::shared_ptr<L1MuGMTDebugBlock> empty;
std::atomic_compare_exchange_strong(&m_db, &empty, temp);
std::shared_ptr<L1MuGMTDebugBlock> empty = nullptr; // Explicit nullptr for CAS
std::atomic_compare_exchange_strong_explicit(
&m_db, &empty, temp, std::memory_order_acq_rel, std::memory_order_acquire);
}
usesResource("L1MuGlobalMuonTrigger");
///EventSetup Tokens
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/L1TMuonEndCap/interface/bdt/Tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace emtf {

Tree(const Tree& tree);
Tree& operator=(const Tree& tree);
Tree(Tree&& tree);
Tree(Tree&& tree) noexcept;

void setRootNode(Node* sRootNode);
Node* getRootNode();
Expand Down
17 changes: 8 additions & 9 deletions L1Trigger/L1TMuonEndCap/src/bdt/Tree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,14 @@ void Tree::findLeafs(Node* local_root, std::list<Node*>& tn) {
findLeafs(local_root->getRightDaughter(), tn);
}

Tree::Tree(Tree&& tree) {
if (rootNode)
delete rootNode; // this line is the only reason not to use default move constructor
rootNode = tree.rootNode;
terminalNodes = std::move(tree.terminalNodes);
numTerminalNodes = tree.numTerminalNodes;
rmsError = tree.rmsError;
boostWeight = tree.boostWeight;
xmlVersion = tree.xmlVersion;
Tree::Tree(Tree&& tree) noexcept
: rootNode(tree.rootNode),
terminalNodes(std::move(tree.terminalNodes)),
numTerminalNodes(tree.numTerminalNodes),
rmsError(tree.rmsError),
boostWeight(tree.boostWeight),
xmlVersion(tree.xmlVersion) {
tree.rootNode = nullptr; // this line is the only reason not to use default move constructor
}

//////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class SteppingHelixStateInfo {
static const std::string ResultName[MAX_RESULT];

SteppingHelixStateInfo()
: path_(0),
: q(0),
path_(0),
radPath_(0),
dir(0),
magVol(nullptr),
Expand Down
2 changes: 1 addition & 1 deletion Validation/RecoParticleFlow/bin/PlotCompareUtility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PlotCompareUtility::PlotCompareUtility(std::string Reference,
std::string RefBasePath,
std::string RefPrefix) {
// open TFiles
cout << refFile << " " << newFile << endl;
cout << Reference << " " << New << endl;
refFile = new TFile(Reference.c_str(), "READ");
newFile = new TFile(New.c_str(), "READ");

Expand Down