[aGrUM] small warnings found

parent 9564eb24
/***************************************************************************
* Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
* {prenom.nom}_at_lip6.fr *
......
......@@ -41,12 +41,12 @@ namespace gum_tests {
// ==============================================================================
void test_Fixed_Allocator_CONST_AND_DEST() {
gum::FixedAllocator* fa;
gum::FixedAllocator* fa = nullptr;
// Test constructor
TS_ASSERT_THROWS_NOTHING(
fa = new gum::FixedAllocator(5 * sizeof(gum::Idx), 50));
// Test destructor
TS_ASSERT_THROWS_NOTHING(delete fa);
TS_ASSERT_THROWS_NOTHING(if (fa != nullptr) delete fa);
}
// ==============================================================================
......@@ -55,10 +55,10 @@ namespace gum_tests {
void test_Fixed_Allocator_ALLOC_DEALLOC_1_ELEM() {
gum::FixedAllocator* fa = new gum::FixedAllocator(5 * sizeof(gum::Idx), 50);
void* pVoid;
void* pVoid = nullptr;
TS_ASSERT_THROWS_NOTHING(pVoid = fa->allocate());
TS_ASSERT_THROWS_NOTHING(fa->deallocate(pVoid));
TS_ASSERT_THROWS_NOTHING(delete fa);
TS_ASSERT_THROWS_NOTHING(if (fa != nullptr) delete fa);
}
// ==============================================================================
......@@ -136,7 +136,7 @@ namespace gum_tests {
// Test Allocation et Deallocation d'un élément
// ==============================================================================
void test_Small_Object_Allocator_ALLOC_DEALLOC_1_ELEM() {
void* pVoid;
void* pVoid = nullptr;
TS_ASSERT_THROWS_NOTHING(
pVoid =
gum::SmallObjectAllocator::instance().allocate(5 * sizeof(gum::Idx)));
......
......@@ -89,12 +89,12 @@ namespace gum_tests {
std::string file = GET_RESSOURCES_PATH("");
gum::FMDP< float > fmdp(true);
gum::FMDPDatReader< float >* reader;
gum::FMDPDatReader< float >* reader = nullptr;
TS_GUM_ASSERT_THROWS_NOTHING(reader =
new gum::FMDPDatReader< float >(&fmdp, file));
TS_GUM_ASSERT_THROWS_NOTHING(delete reader);
TS_GUM_ASSERT_THROWS_NOTHING(if (reader != nullptr) delete reader);
}
void testReadFileCoffeeRobot() {
......
......@@ -217,7 +217,7 @@ namespace gum_tests {
gum::Size nbSamples2 = nbSamples1 * 100;
gum::Size nbSamples3 = nbSamples1 * 1000;
double ll_1, ll_2, ll_3;
double ll_1 = 0, ll_2 = 0, ll_3 = 0;
double tolerance = 0.1;
gum::learning::BNDatabaseGenerator< double >* dbgen = nullptr;
......
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