summaryrefslogtreecommitdiff
path: root/ASNMP
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2004-05-06 18:14:49 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2004-05-06 18:14:49 +0000
commit32f8a916dd4b7f686621b5b9b04a3ab264058948 (patch)
tree57a708258ce83cf9a86e5118040882c6bfabf41f /ASNMP
parent6819d3da73d2444302f936b32a8fce57e1ac02bc (diff)
downloadATCD-32f8a916dd4b7f686621b5b9b04a3ab264058948.tar.gz
ChangeLogTag:Thu May 6 11:13:25 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'ASNMP')
-rw-r--r--ASNMP/asnmp/ChangeLog8
-rw-r--r--ASNMP/asnmp/oid.cpp4
-rw-r--r--ASNMP/asnmp/pdu.cpp7
3 files changed, 14 insertions, 5 deletions
diff --git a/ASNMP/asnmp/ChangeLog b/ASNMP/asnmp/ChangeLog
index c85b457f2fd..ac87d346e43 100644
--- a/ASNMP/asnmp/ChangeLog
+++ b/ASNMP/asnmp/ChangeLog
@@ -1,3 +1,11 @@
+Thu May 6 11:13:25 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * oid.cpp (operator+=, OidToStr):
+ * pdu.cpp (agent_error_reason):
+
+ Fixed warnings regarding mismatch format specifiers and
+ arguments to sprintf().
+
Thu May 6 11:05:01 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
* gauge.h:
diff --git a/ASNMP/asnmp/oid.cpp b/ASNMP/asnmp/oid.cpp
index 336bef90e15..d5aa31b5d09 100644
--- a/ASNMP/asnmp/oid.cpp
+++ b/ASNMP/asnmp/oid.cpp
@@ -433,7 +433,7 @@ Oid& Oid::operator+=( const unsigned long i)
if (ACE_OS::strlen(ptr))
ACE_OS::strcat(ptr,".");
- if (ACE_OS::sprintf( buffer,"%u",i) != -1) {
+ if (ACE_OS::sprintf( buffer,"%lu",i) != -1) {
ACE_OS::strcat(ptr, buffer);
if ( smival.value.oid.ptr ) {
set_invalid();
@@ -744,7 +744,7 @@ int Oid::OidToStr( SmiLPOID srcOid, unsigned long size,
for (index=0; index < srcOid->len; index++) {
// convert data element to a string
- if (ACE_OS::sprintf( szNumber,"%u", srcOid->ptr[index]) == -1)
+ if (ACE_OS::sprintf( szNumber,"%lu", srcOid->ptr[index]) == -1)
return -1;
// verify len is not over
diff --git a/ASNMP/asnmp/pdu.cpp b/ASNMP/asnmp/pdu.cpp
index ddd43a292ad..49d63b58b6a 100644
--- a/ASNMP/asnmp/pdu.cpp
+++ b/ASNMP/asnmp/pdu.cpp
@@ -316,9 +316,10 @@ const char *Pdu::agent_error_reason()
}
ACE_OS::sprintf(output_,
-"FAIL PDU REPORT: pdu id: %d vb cnt: %d vb idx: %d \n\
-msg: %s vb oid: %s value: %s",
- get_request_id(), n_vbs, get_error_index(), pmsg, id, val);
+ "FAIL PDU REPORT: pdu id: %d vb cnt: %d vb idx: %ld \n"
+ " msg: %s vb oid: %s value: %s",
+ get_request_id(), n_vbs, get_error_index(),
+ pmsg, id, val);
return output_;
}