Commit d4ae6cec authored by Lynn Garren's avatar Lynn Garren

protect against -Wmaybe-uninitialized

parent 17c16ba5
......@@ -7,6 +7,7 @@
* Utility/Utility/memory.h: protect against non virtual destructor warning
* Random/Random/RandGaussZiggurat.h, Random/src/RandGaussZiggurat.cc: use std::abs
* deal with shadowing variables in GenericFunctions, Random/test, and Utility/test
* Evaluator/src/Evaluator.cc: protect against maybe-uninitialized warning
==============================
10.02.15 Release CLHEP-2.2.0.5
......
......@@ -105,6 +105,22 @@ static int variable(const string & name, double & result,
}
}
#if defined __GNUC__
#if __GNUC__ > 3 && __GNUC_MINOR__ > 6
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#if __GNUC__ > 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmaybe-uninitialized"
#endif
static int function(const string & name, stack<double> & par,
double & result, const dic_type & dictionary)
/***********************************************************************
......@@ -159,6 +175,17 @@ static int function(const string & name, stack<double> & par,
}
return (errno == 0) ? EVAL::OK : EVAL::ERROR_CALCULATION_ERROR;
}
#if defined __GNUC__
#if __GNUC__ > 3 && __GNUC_MINOR__ > 6
#pragma GCC diagnostic pop
#endif
#if __GNUC__ > 4
#pragma GCC diagnostic pop
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
static int operand(pchar begin, pchar end, double & result,
pchar & endp, const dic_type & dictionary)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment