diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2004-05-06 18:06:14 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2004-05-06 18:06:14 +0000 |
commit | d2d63c1b0a11e71a4274c135659922936b601a2c (patch) | |
tree | d8aa6eeb57963e95aee16aaeba0e8659fa558e3f /ASNMP | |
parent | 292fba72681443e4146f54a55a7634a777ad02a4 (diff) | |
download | ATCD-d2d63c1b0a11e71a4274c135659922936b601a2c.tar.gz |
ChangeLogTag:Thu May 6 11:03:26 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'ASNMP')
-rw-r--r-- | ASNMP/ChangeLog | 10 | ||||
-rw-r--r-- | ASNMP/tests/Counter64_Test.cpp | 4 | ||||
-rw-r--r-- | ASNMP/tests/Counter_Test.cpp | 10 | ||||
-rw-r--r-- | ASNMP/tests/Gauge_Test.cpp | 10 | ||||
-rw-r--r-- | ASNMP/tests/Integer_Test.cpp | 20 |
5 files changed, 32 insertions, 22 deletions
diff --git a/ASNMP/ChangeLog b/ASNMP/ChangeLog index 4252c29b755..709d4491de1 100644 --- a/ASNMP/ChangeLog +++ b/ASNMP/ChangeLog @@ -1,3 +1,13 @@ +Thu May 6 11:03:26 2004 Ossama Othman <ossama@dre.vanderbilt.edu> + + * tests/Counter_Test.cpp (TestCounter): + * tests/Counter64_Test.cpp (TestCounter64): + * tests/Gauge_Test.cpp (TestGuage): + * tests/Integer_Test.cpp (TestUnsignedInteger32): + + Fixed "comparison between signed and unsigned integer" + warnings. + Mon Apr 26 18:37:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl> * examples/get/get.cpp: diff --git a/ASNMP/tests/Counter64_Test.cpp b/ASNMP/tests/Counter64_Test.cpp index 8bdc90b9c8f..d38a7524100 100644 --- a/ASNMP/tests/Counter64_Test.cpp +++ b/ASNMP/tests/Counter64_Test.cpp @@ -136,11 +136,11 @@ static void TestCounter64() c4 = c4; ACE_ASSERT(c5 == c4); c5 = ll; - ACE_ASSERT(c5 == ll); + ACE_ASSERT(c5 == static_cast<ACE_UINT64> (ll)); // try simple arithmetic (needs more test cases) c5 = mll; c5 = c5 + (ULLONG) 10; - ACE_ASSERT(c5 == (mll + 10)); + ACE_ASSERT(c5 == static_cast<ACE_UINT64> (mll + 10)); #endif /*ACE_WIN32 */ } diff --git a/ASNMP/tests/Counter_Test.cpp b/ASNMP/tests/Counter_Test.cpp index 6cb7c5fcbf5..28bbe47d873 100644 --- a/ASNMP/tests/Counter_Test.cpp +++ b/ASNMP/tests/Counter_Test.cpp @@ -79,15 +79,15 @@ static void TestCounter() Counter32 c1; ACE_ASSERT(c1 == def); Counter32 c2(l); - ACE_ASSERT(c2 == l); + ACE_ASSERT(c2 == static_cast<unsigned long> (l)); Counter32 c3(nl); - ACE_ASSERT(c3 == nl); + ACE_ASSERT(c3 == static_cast<unsigned long> (nl)); Counter32 c4(ul); ACE_ASSERT(c4 == ul); Counter32 c5(i); - ACE_ASSERT(c5 == i); + ACE_ASSERT(c5 == static_cast<unsigned long> (i)); Counter32 c6(ni); - ACE_ASSERT(c6 == ni); + ACE_ASSERT(c6 == static_cast<unsigned long> (ni)); Counter32 c7(ui); ACE_ASSERT(c7 == ui); Counter32 *c8 = new Counter32(c5); @@ -119,7 +119,7 @@ static void TestCounter() c1 = us; // unsigned short ACE_ASSERT(c1 == us); c1 = si; // unsigned short - ACE_ASSERT(c1 == si); + ACE_ASSERT(c1 == static_cast<unsigned long> (si)); #endif /*ACE_WIN32*/ } diff --git a/ASNMP/tests/Gauge_Test.cpp b/ASNMP/tests/Gauge_Test.cpp index b8ea7d45edd..d47b22b7169 100644 --- a/ASNMP/tests/Gauge_Test.cpp +++ b/ASNMP/tests/Gauge_Test.cpp @@ -76,15 +76,15 @@ TestGuage (void) Gauge32 g1; ACE_ASSERT(g1 == def); Gauge32 g2(l); - ACE_ASSERT(g2 == ACE_static_cast (unsigned long, l)); + ACE_ASSERT(g2 == static_cast<unsigned long> (l)); Gauge32 g3(nl); - ACE_ASSERT(g3 == ACE_static_cast (unsigned long, nl)); + ACE_ASSERT(g3 == static_cast<unsigned long> (nl)); Gauge32 g4(ul); ACE_ASSERT(g4 == ul); Gauge32 g5(i); - ACE_ASSERT(g5 == ACE_static_cast (unsigned long, i)); + ACE_ASSERT(g5 == static_cast<unsigned long> (i)); Gauge32 g6(ni); - ACE_ASSERT(g6 == ACE_static_cast (unsigned long, ni)); + ACE_ASSERT(g6 == static_cast<unsigned long> (ni)); Gauge32 g7(ui); ACE_ASSERT(g7 == ui); Gauge32 *g8 = new Gauge32(g5); @@ -116,7 +116,7 @@ TestGuage (void) g1 = us; // unsigned short ACE_ASSERT(g1 == us); g1 = si; // unsigned short - ACE_ASSERT(g1 == si); + ACE_ASSERT(g1 == static_cast<unsigned long> (si)); #endif /*ACE_WIN32*/ } diff --git a/ASNMP/tests/Integer_Test.cpp b/ASNMP/tests/Integer_Test.cpp index 4a5376be1d3..73963f321af 100644 --- a/ASNMP/tests/Integer_Test.cpp +++ b/ASNMP/tests/Integer_Test.cpp @@ -73,19 +73,19 @@ static void TestInteger32() #if !defined (ACE_WIN32) // constructors SnmpInt32 i1; - ACE_ASSERT(i1 == ACE_static_cast (long, def)); + ACE_ASSERT(i1 == static_cast<long> (def)); SnmpInt32 i2(l); ACE_ASSERT(i2 == l); SnmpInt32 i3(nl); ACE_ASSERT(i3 == nl); SnmpInt32 i4(ul); - ACE_ASSERT(i4 == ACE_static_cast (long, ul)); + ACE_ASSERT(i4 == static_cast<long> (ul)); SnmpInt32 i5(i); ACE_ASSERT(i5 == i); SnmpInt32 i6(ni); ACE_ASSERT(i6 == ni); SnmpInt32 i7(ui); - ACE_ASSERT(i7 == ui); + ACE_ASSERT(i7 == static_cast<long> (ui)); SnmpInt32 *i8 = new SnmpInt32(i5); ACE_ASSERT(i8 != 0); delete i8; @@ -111,11 +111,11 @@ static void TestInteger32() i1 = i1; // self ACE_ASSERT(i1 == i1); i1 = def; // unsigned long - ACE_ASSERT(i1 == def); + ACE_ASSERT(i1 == static_cast<long> (def)); i1 = us; // unsigned short - ACE_ASSERT(i1 == ACE_static_cast (long, us)); + ACE_ASSERT(i1 == static_cast<long> (us)); i1 = si; // unsigned short - ACE_ASSERT(i1 == ACE_static_cast (long, si)); + ACE_ASSERT(i1 == static_cast<long> (si)); #endif /*ACE_WIN32*/ } @@ -140,15 +140,15 @@ static void TestUnsignedInteger32() SnmpUInt32 u1; ACE_ASSERT(u1 == def); SnmpUInt32 u2(l); - ACE_ASSERT(u2 == ACE_static_cast (unsigned long, l)); + ACE_ASSERT(u2 == static_cast<unsigned long> (l)); SnmpUInt32 u3(nl); - ACE_ASSERT(u3 == ACE_static_cast (unsigned long, nl)); + ACE_ASSERT(u3 == static_cast<unsigned long> (nl)); SnmpUInt32 u4(ul); ACE_ASSERT(u4 == ul); SnmpUInt32 u5(i); - ACE_ASSERT(u5 == ACE_static_cast (unsigned long, i)); + ACE_ASSERT(u5 == static_cast<unsigned long> (i)); SnmpUInt32 u6(ni); - ACE_ASSERT(u6 == ACE_static_cast (unsigned long, ni)); + ACE_ASSERT(u6 == static_cast<unsigned long> (ni)); SnmpUInt32 u7(ui); ACE_ASSERT(u7 == ui); SnmpUInt32 *u8 = new SnmpUInt32(u5); |