summaryrefslogtreecommitdiff
path: root/ASNMP
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2004-04-16 23:54:25 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2004-04-16 23:54:25 +0000
commitc5f45251196bfc54e2fcf1102d5541a9efb723c2 (patch)
tree05be0d3feec11b557ac1cc2472ee04537d41db63 /ASNMP
parent39e64261259e09a44f0f6dc71e4d718ede2c43a4 (diff)
downloadATCD-c5f45251196bfc54e2fcf1102d5541a9efb723c2.tar.gz
ChangeLogTag:Fri Apr 16 16:53:20 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'ASNMP')
-rw-r--r--ASNMP/ChangeLog8
-rw-r--r--ASNMP/tests/Gauge_Test.cpp17
-rw-r--r--ASNMP/tests/Integer_Test.cpp12
3 files changed, 25 insertions, 12 deletions
diff --git a/ASNMP/ChangeLog b/ASNMP/ChangeLog
index 76d7f4a19a2..3b1b7ed868b 100644
--- a/ASNMP/ChangeLog
+++ b/ASNMP/ChangeLog
@@ -1,3 +1,11 @@
+Fri Apr 16 16:53:20 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * tests/Gauge_Test.cpp (TestGuage):
+ * tests/Integer_Test.cpp (TestInteger32):
+
+ Fixed some "comparison between signed and unsigned integer"
+ warnings.
+
Mon Mar 29 06:56:11 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Integer_Test.cpp:
diff --git a/ASNMP/tests/Gauge_Test.cpp b/ASNMP/tests/Gauge_Test.cpp
index fdb67451672..b8ea7d45edd 100644
--- a/ASNMP/tests/Gauge_Test.cpp
+++ b/ASNMP/tests/Gauge_Test.cpp
@@ -40,7 +40,9 @@ DAMAGES.
#include "asnmp/gauge.h"
#include "test_config.h"
-ACE_RCSID(tests, Gauge_Test, "$Id$")
+ACE_RCSID (tests,
+ Gauge_Test,
+ "$Id$")
/*
Gauge32( void);
@@ -56,10 +58,11 @@ ACE_RCSID(tests, Gauge_Test, "$Id$")
-- What is a Gauge? According to RFC 1155 section: 3.2.3.4
This application-wide type represents a non-negative integer
- which may increase or decreae, but which latches at a maximum
+ which may increase or decrease, but which latches at a maximum
value of 2^32-1 (4294967295 dec) for gauges.
*/
-static void TestGuage()
+static void
+TestGuage (void)
{
#if !defined (ACE_WIN32)
long l = LONG_MAX, nl = LONG_MIN; // limits.h
@@ -73,15 +76,15 @@ static void TestGuage()
Gauge32 g1;
ACE_ASSERT(g1 == def);
Gauge32 g2(l);
- ACE_ASSERT(g2 == l);
+ ACE_ASSERT(g2 == ACE_static_cast (unsigned long, l));
Gauge32 g3(nl);
- ACE_ASSERT(g3 == nl);
+ ACE_ASSERT(g3 == ACE_static_cast (unsigned long, nl));
Gauge32 g4(ul);
ACE_ASSERT(g4 == ul);
Gauge32 g5(i);
- ACE_ASSERT(g5 == i);
+ ACE_ASSERT(g5 == ACE_static_cast (unsigned long, i));
Gauge32 g6(ni);
- ACE_ASSERT(g6 == ni);
+ ACE_ASSERT(g6 == ACE_static_cast (unsigned long, ni));
Gauge32 g7(ui);
ACE_ASSERT(g7 == ui);
Gauge32 *g8 = new Gauge32(g5);
diff --git a/ASNMP/tests/Integer_Test.cpp b/ASNMP/tests/Integer_Test.cpp
index 939ca05fc43..32d4d026553 100644
--- a/ASNMP/tests/Integer_Test.cpp
+++ b/ASNMP/tests/Integer_Test.cpp
@@ -42,7 +42,9 @@ DAMAGES.
#include "asnmp/integer.h"
#include "test_config.h"
-ACE_RCSID(tests, Integer_Test, "$Id$")
+ACE_RCSID (tests,
+ Integer_Test,
+ "$Id$")
static long l = LONG_MAX, nl = LONG_MIN; // limits.h
static unsigned long ul = ULONG_MAX, def = 0;
@@ -71,13 +73,13 @@ static void TestInteger32()
#if !defined (ACE_WIN32)
// constructors
SnmpInt32 i1;
- ACE_ASSERT(i1 == def);
+ ACE_ASSERT(i1 == ACE_static_cast (long, def));
SnmpInt32 i2(l);
ACE_ASSERT(i2 == l);
SnmpInt32 i3(nl);
ACE_ASSERT(i3 == nl);
SnmpInt32 i4(ul);
- ACE_ASSERT(i4 == ul);
+ ACE_ASSERT(i4 == ACE_static_cast (long, ul));
SnmpInt32 i5(i);
ACE_ASSERT(i5 == i);
SnmpInt32 i6(ni);
@@ -111,9 +113,9 @@ static void TestInteger32()
i1 = def; // unsigned long
ACE_ASSERT(i1 == def);
i1 = us; // unsigned short
- ACE_ASSERT(i1 == us);
+ ACE_ASSERT(i1 == ACE_static_cast (long, us));
i1 = si; // unsigned short
- ACE_ASSERT(i1 == si);
+ ACE_ASSERT(i1 == ACE_static_cast (long, si))
#endif /*ACE_WIN32*/
}