Commit 6b339f8c authored by Lynn Garren's avatar Lynn Garren

fix warnings found when using -W

parent db8c360f
2010-10-25 Lynn Garren <garren@fnal.gov>
* Random/Random/NonRandomEngine.h, Random/Random/RandomEngine.h,
Random/Random/RandomEngine.icc, Random/src/RandomEngine.cc: minor
changes to avoid compilation warnings when using the -W flag
2010-10-21 Mark Fischler <mf@fnal.gov> and Lynn Garren <garren@fnal.gov>
* Random/src/Ranlux64Engine.cc: fix problem with random numbers when seed is
greater than 32bits
* Random/src/Ranlux64Engine.cc: fix problem with random numbers when
seed is greater than 32bits
* Random/test/testBug73093.cc: test for the Ranlux64Engine problem
==============================
......
2010-10-25 Lynn Garren <garren@fnal.gov>
* Random/NonRandomEngine.h, Random/RandomEngine.h,
Random/RandomEngine.icc, src/RandomEngine.cc: minor changes
to avoid compilation warnings when using the -W flag
2010-10-21 Mark Fischler <mf@fnal.gov> and Lynn Garren <garren@fnal.gov>
* src/Ranlux64Engine.cc: fix problem with random numbers when seed is
......
// $Id: NonRandomEngine.h,v 1.5 2010/06/16 17:24:53 garren Exp $
// $Id: NonRandomEngine.h,v 1.6 2010/10/25 18:18:47 garren Exp $
// -*- C++ -*-
//
// -----------------------------------------------------------------------
......@@ -88,10 +88,10 @@ private:
// The following are necessary to fill virtual methods but should never
// be used:
virtual void setSeed(long seed, int) {};
virtual void setSeeds(const long * seeds, int) {};
virtual void saveStatus( const char filename[] = "Config.conf") const {};
virtual void restoreStatus( const char filename[] = "Config.conf" ) {};
virtual void setSeed(long , int) {};
virtual void setSeeds(const long * , int) {};
virtual void saveStatus( const char filename[] ) const {};
virtual void restoreStatus( const char filename[] ) {};
virtual void showStatus() const {};
......
// $Id: RandomEngine.h,v 1.5 2010/06/16 17:24:53 garren Exp $
// $Id: RandomEngine.h,v 1.6 2010/10/25 18:18:47 garren Exp $
// -*- C++ -*-
//
// -----------------------------------------------------------------------
......@@ -144,15 +144,15 @@ protected:
long theSeed;
const long* theSeeds;
inline static double const exponent_bit_32();
inline static double const mantissa_bit_12();
inline static double const mantissa_bit_24();
inline static double const mantissa_bit_32();
inline static double const twoToMinus_32();
inline static double const twoToMinus_48();
inline static double const twoToMinus_49();
inline static double const twoToMinus_53();
inline static double const nearlyTwoToMinus_54();
static inline double exponent_bit_32();
static inline double mantissa_bit_12();
static inline double mantissa_bit_24();
static inline double mantissa_bit_32();
static inline double twoToMinus_32();
static inline double twoToMinus_48();
static inline double twoToMinus_49();
static inline double twoToMinus_53();
static inline double nearlyTwoToMinus_54();
static bool checkFile (std::istream & file,
const std::string & filename,
......
// $Id: RandomEngine.icc,v 1.3 2010/06/16 17:24:53 garren Exp $
// $Id: RandomEngine.icc,v 1.4 2010/10/25 18:18:47 garren Exp $
// -*- C++ -*-
//
// -----------------------------------------------------------------------
......@@ -26,43 +26,43 @@ inline bool HepRandomEngine::operator!=(const HepRandomEngine& engine) {
return (this!=&engine);
}
inline double const HepRandomEngine::exponent_bit_32() {
static double const exponent_bit_32 = std::pow(2.0, 32.0);
inline double HepRandomEngine::exponent_bit_32() {
static double exponent_bit_32 = std::pow(2.0, 32.0);
return exponent_bit_32;
}
inline double const HepRandomEngine::mantissa_bit_12() {
static double const mantissa_bit_12 = std::pow(0.5, 12.0);
inline double HepRandomEngine::mantissa_bit_12() {
static double mantissa_bit_12 = std::pow(0.5, 12.0);
return mantissa_bit_12;
}
inline double const HepRandomEngine::mantissa_bit_24() {
static double const mantissa_bit_24 = std::pow(0.5, 24.0);
inline double HepRandomEngine::mantissa_bit_24() {
static double mantissa_bit_24 = std::pow(0.5, 24.0);
return mantissa_bit_24;
}
inline double const HepRandomEngine::twoToMinus_32() {
static double const twoToMinus_32 = std::ldexp(1.0, -32);
inline double HepRandomEngine::twoToMinus_32() {
static double twoToMinus_32 = std::ldexp(1.0, -32);
return twoToMinus_32;
}
inline double const HepRandomEngine::twoToMinus_48() {
static double const twoToMinus_48 = std::ldexp(1.0, -48);
inline double HepRandomEngine::twoToMinus_48() {
static double twoToMinus_48 = std::ldexp(1.0, -48);
return twoToMinus_48;
}
inline double const HepRandomEngine::twoToMinus_49() {
static double const twoToMinus_49 = std::ldexp(1.0, -49);
inline double HepRandomEngine::twoToMinus_49() {
static double twoToMinus_49 = std::ldexp(1.0, -49);
return twoToMinus_49;
}
inline double const HepRandomEngine::twoToMinus_53() {
static double const twoToMinus_53 = std::ldexp(1.0, -53);
inline double HepRandomEngine::twoToMinus_53() {
static double twoToMinus_53 = std::ldexp(1.0, -53);
return twoToMinus_53;
}
inline double const HepRandomEngine::nearlyTwoToMinus_54() {
static double const nearlyTwoToMinus_54 = std::ldexp(1.0, -54)
inline double HepRandomEngine::nearlyTwoToMinus_54() {
static double nearlyTwoToMinus_54 = std::ldexp(1.0, -54)
- std::ldexp(1.0, -100);
return nearlyTwoToMinus_54;
}
......
// $Id: RandomEngine.cc,v 1.6 2010/06/16 17:24:53 garren Exp $
// $Id: RandomEngine.cc,v 1.7 2010/10/25 18:18:47 garren Exp $
// -*- C++ -*-
//
// ------------------------------------------------------------------------
......@@ -78,11 +78,11 @@ std::vector<unsigned long> HepRandomEngine::put () const {
std::vector<unsigned long> v;
return v;
}
bool HepRandomEngine::get (const std::vector<unsigned long> & v) {
bool HepRandomEngine::get (const std::vector<unsigned long> & ) {
std::cerr << "HepRandomEngine::get(v) called -- no effect!\n";
return false;
}
bool HepRandomEngine::getState (const std::vector<unsigned long> & v) {
bool HepRandomEngine::getState (const std::vector<unsigned long> & ) {
std::cerr << "HepRandomEngine::getState(v) called -- no effect!\n";
return false;
}
......
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