diff --git a/source/src/core/scoring/lkball/LK_DomeEnergy.cc b/source/src/core/scoring/lkball/LK_DomeEnergy.cc index 9ffb2cfb6e1..451ac50b523 100644 --- a/source/src/core/scoring/lkball/LK_DomeEnergy.cc +++ b/source/src/core/scoring/lkball/LK_DomeEnergy.cc @@ -1034,15 +1034,14 @@ cubed_root( Real val ) { DerivativeFinderWadj::DerivativeFinderWadj( Vector const & base, Vector const & water, Real w_dist, Real water_adjust ) -: x(14) +: B( base ), +W( water ), +B_to_W( water - base ), +wadj( water_adjust ), +w_dist_( w_dist ), +x(14) { - w_dist_ = w_dist; - wadj = water_adjust; - - B = base; - W = water; - B_to_W = W - B; B_to_W_norm = B_to_W.norm(); B_to_W_norm2 = B_to_W_norm*B_to_W_norm; B_to_W_norm3 = B_to_W_norm2*B_to_W_norm; @@ -1098,21 +1097,19 @@ DerivativeFinderWadj::dWadj_dWater() { DerivativeFinder::DerivativeFinder( Vector const & base, Vector const & water, Vector const & other, Real min_cose, Real min_sine, Real max_cose, Real max_sine, Real w_dist, Real water_adjust ) : + B(base), + W(water), + Ot(other), + W_to_Ot(Ot - W), + B_to_W(W - B), + w_dist_( w_dist ), + wadj( water_adjust ), x(175) { - w_dist_ = w_dist; - wadj = water_adjust; - - B = base; - W = water; - Ot = other; - - W_to_Ot = Ot - W; W_to_Ot_norm = W_to_Ot.norm(); W_to_Ot_norm2 = W_to_Ot_norm*W_to_Ot_norm; W_to_Ot_norm3 = W_to_Ot_norm*W_to_Ot_norm2; - B_to_W = W - B; B_to_W_norm = B_to_W.norm(); B_to_W_norm2 = B_to_W_norm*B_to_W_norm; B_to_W_norm3 = B_to_W_norm2*B_to_W_norm; diff --git a/source/src/numeric/MathMatrix.hh b/source/src/numeric/MathMatrix.hh index 83e344a9b33..623208172c1 100644 --- a/source/src/numeric/MathMatrix.hh +++ b/source/src/numeric/MathMatrix.hh @@ -59,7 +59,7 @@ public: ////////////////////////////////// /// @brief default constructor - MathMatrix< T>() : + MathMatrix() : NumberRows_( 0), NumberCols_( 0), size_( 0 ), @@ -79,7 +79,7 @@ public: /// @param NUMBER_ROWS number of rows in matrix /// @param NUMBER_COLS number of cols in matrix /// @param FILL_VALUE assign every element to that value - explicit MathMatrix< T> + explicit MathMatrix ( const Size NUMBER_ROWS, const Size NUMBER_COLS, @@ -98,7 +98,7 @@ public: /// @param NUMBER_ROWS number of rows in matrix /// @param NUMBER_COLS number of cols in matrix /// @param DATA pointer to field of data - MathMatrix< T> + MathMatrix ( const Size NUMBER_ROWS, const Size NUMBER_COLS, @@ -133,7 +133,7 @@ public: } /// @brief destructor - ~MathMatrix< T>() + ~MathMatrix() { delete[] data_; } diff --git a/source/src/numeric/MathVector.hh b/source/src/numeric/MathVector.hh index 8f77d595261..a8c1c2d80eb 100644 --- a/source/src/numeric/MathVector.hh +++ b/source/src/numeric/MathVector.hh @@ -66,7 +66,7 @@ public: ////////////////////////////////// /// @brief default constructor - MathVector< T>() : + MathVector() : size_( 0), data_( nullptr ) { @@ -81,7 +81,7 @@ public: /// @brief construct from size and possible filler /// @param SIZE number fo elements in Vector /// @param FILL_VALUE assign every element to that value - explicit MathVector< T>( const Size SIZE, const T &FILL_VALUE= T( 0)) : + explicit MathVector( const Size SIZE, const T &FILL_VALUE= T( 0)) : size_( SIZE), data_( new T[ SIZE]) { @@ -91,7 +91,7 @@ public: } /// @brief construct from length and pointer to data - MathVector< T>( const Size SIZE, const T *DATA) : + MathVector( const Size SIZE, const T *DATA) : size_( SIZE), data_( new T[ SIZE]) { @@ -110,13 +110,13 @@ public: /// @brief Clone function /// @return pointer to new Vector< T> - MathVector< T> *clone() const + MathVector *clone() const { return new MathVector< T>( *this); } /// @ brief destructor - ~MathVector< T>() + ~MathVector() { delete[] data_; } diff --git a/source/src/numeric/histograms/OneDHistogram.hh b/source/src/numeric/histograms/OneDHistogram.hh index 72ddb913be3..62daea39522 100644 --- a/source/src/numeric/histograms/OneDHistogram.hh +++ b/source/src/numeric/histograms/OneDHistogram.hh @@ -38,7 +38,7 @@ class OneDHistogram { public: - OneDHistogram()= default; + OneDHistogram()= default; void insert_data(key1 key_1, platform::Size counts){ histogram_.insert(std::make_pair(key_1, counts)); diff --git a/source/src/protocols/forge/remodel/RemodelGlobalFrame.cc b/source/src/protocols/forge/remodel/RemodelGlobalFrame.cc index 47a5a49d8fb..cc9a829bd80 100644 --- a/source/src/protocols/forge/remodel/RemodelGlobalFrame.cc +++ b/source/src/protocols/forge/remodel/RemodelGlobalFrame.cc @@ -209,7 +209,7 @@ void RemodelGlobalFrame::get_helical_params( core::pose::Pose & pose ) { Matrix3f I = Matrix3f::Identity(); Matrix3f N = 0.5*(H+H.transpose()) - cos(omega)*I; - Vector3f hN; + Vector3f hN{0.0, 0.0, 0.0}; Real scalar = 0; Real max_scalar = -10000000; for ( core::Size i = 0; i<=2; i++ ) { diff --git a/source/src/utility/options/VectorOption_T_.hh b/source/src/utility/options/VectorOption_T_.hh index 3184882f239..0a2ccdb173f 100644 --- a/source/src/utility/options/VectorOption_T_.hh +++ b/source/src/utility/options/VectorOption_T_.hh @@ -106,17 +106,8 @@ protected: // Creation /// @brief Copy constructor - inline - VectorOption_T_( VectorOption_T_ const & option ) : - Super( option ) -#ifdef VECTOROPTION_T_FULL_THREAD_SAFETY - , - mutex_() -#endif - { - (*this) = option; - } + VectorOption_T_( VectorOption_T_ const & option ) = default; /// @brief Key + description constructor inline diff --git a/source/test/core/fragment/ConstantLengthFragments.cxxtest.hh b/source/test/core/fragment/ConstantLengthFragments.cxxtest.hh index e37dfcc982f..fc913beedec 100644 --- a/source/test/core/fragment/ConstantLengthFragments.cxxtest.hh +++ b/source/test/core/fragment/ConstantLengthFragments.cxxtest.hh @@ -267,11 +267,11 @@ void FragmentConstantLengthTest::test_frag_iterator() { FrameList frames; if ( fragset.region( movemap, pos, pos, len, len, frames ) ) { Frame const& frame ( * ( frames[ 1 ] ) ); - Size val; + Size val = 0; TS_ASSERT( silly_cache.retrieve(frame, 1, val) ); //there should be a value ( return true ) TS_ASSERT_EQUALS( val , pos ); - Size val2; + Size val2 = 999555; // Something non-zero; TS_ASSERT( it != eit ); TS_ASSERT( silly_cache.retrieve( **it , 1, val2) ); //there should be a value ( return true ) TS_ASSERT_EQUALS( val2 , val ); @@ -285,7 +285,7 @@ void FragmentConstantLengthTest::test_frag_iterator() { ConstFrameIterator it = bfragset.begin(); ConstFrameIterator eit= bfragset.end(); for ( Size pos=1 ; it!=eit; ++it ) { - Size val; + Size val = 0; silly_cache.retrieve( **it, 1, val); TS_ASSERT_EQUALS( val, pos ); ++pos; diff --git a/source/test/utility/UTools.cxxtest.hh b/source/test/utility/UTools.cxxtest.hh index 4b517114694..ad89770ba7e 100644 --- a/source/test/utility/UTools.cxxtest.hh +++ b/source/test/utility/UTools.cxxtest.hh @@ -133,8 +133,8 @@ public: // ------------------------------------------ // /// @brief test isMarkup function void test_isMarkup() { - double num; - unsigned int end_pos; + double num = 0.0; + unsigned int end_pos = 0; bool res; res = test::utools::isMarkup("something(1.23)", 0, num, end_pos, "MARKUP("); diff --git a/source/tools/build/basic.settings b/source/tools/build/basic.settings index 29f1e3d6d01..0d4fae07529 100644 --- a/source/tools/build/basic.settings +++ b/source/tools/build/basic.settings @@ -443,6 +443,16 @@ settings = { }, }, + "gcc, |cxx_ver:>=15.0|" : { + "appends" : { + "flags" : { + "warn" : [ + "Wno-error=dangling-pointer=", # Boost spirit issue + ], + }, + }, + }, + "gcc, |cxx_ver:>=13.0|" : { "appends" : { "flags" : {