Eliminate some gcc warnings

This commit is contained in:
Aleksandar Fabijanic
2007-09-04 20:14:40 +00:00
parent ab1b6c29ca
commit 0a65eefd9a
2 changed files with 68 additions and 31 deletions

View File

@@ -114,7 +114,7 @@ void DynamicAnyTest::testInt8()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -185,7 +185,7 @@ void DynamicAnyTest::testInt16()
try
{
Int32 value2 = a1.extract<Int32>();
Int32 value2; value2 = a1.extract<Int32>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -256,7 +256,7 @@ void DynamicAnyTest::testInt32()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -327,7 +327,7 @@ void DynamicAnyTest::testInt64()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -398,7 +398,7 @@ void DynamicAnyTest::testUInt8()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -469,7 +469,7 @@ void DynamicAnyTest::testUInt16()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -540,7 +540,7 @@ void DynamicAnyTest::testUInt32()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -611,7 +611,7 @@ void DynamicAnyTest::testUInt64()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -682,7 +682,7 @@ void DynamicAnyTest::testBool()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -753,7 +753,7 @@ void DynamicAnyTest::testChar()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -824,7 +824,7 @@ void DynamicAnyTest::testFloat()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -895,7 +895,7 @@ void DynamicAnyTest::testDouble()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -961,7 +961,7 @@ void DynamicAnyTest::testString()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -1032,7 +1032,7 @@ void DynamicAnyTest::testLong()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -1103,7 +1103,7 @@ void DynamicAnyTest::testULong()
try
{
Int16 value2 = a1.extract<Int16>();
Int16 value2; value2 = a1.extract<Int16>();
fail("bad cast - must throw");
}
catch (Poco::BadCastException&)
@@ -1123,9 +1123,8 @@ void DynamicAnyTest::testConversionOperator()
assert (s == "123");
any = 321;
//fails on gcc 3.4.4.
//s = (std::string) any;//must cast to disambiguate char/string
//assert (s == "321");
s = any.convert<std::string>();
assert (s == "321");
any = "456";
assert (any == "456");