Fix int vs. ssize_t type confusion
Plus a typo in the target type of a static_cast.
Change-Id: Icb8288baeab20d470c334742d989ffe231fdca7c
diff --git a/src/encoding/tlv.hpp b/src/encoding/tlv.hpp
index 889d0b8..ad964e2 100644
--- a/src/encoding/tlv.hpp
+++ b/src/encoding/tlv.hpp
@@ -294,7 +294,7 @@
return false;
}
- type = static_cast<uint64_t>(number);
+ type = static_cast<uint32_t>(number);
return true;
}
diff --git a/src/security/identity-certificate.cpp b/src/security/identity-certificate.cpp
index 1eaceac..7a7180d 100644
--- a/src/security/identity-certificate.cpp
+++ b/src/security/identity-certificate.cpp
@@ -68,7 +68,7 @@
IdentityCertificate::isCorrectName(const Name& name)
{
string idString("ID-CERT");
- int i = name.size() - 1;
+ ssize_t i = name.size() - 1;
for (; i >= 0; i--) {
if (name.get(i).toUri() == idString)
break;
diff --git a/tools/ndnputchunks3.cpp b/tools/ndnputchunks3.cpp
index ca9475a..6eea0b7 100644
--- a/tools/ndnputchunks3.cpp
+++ b/tools/ndnputchunks3.cpp
@@ -40,7 +40,7 @@
do
{
std::cin.read(buf, MAX_SEG_SIZE);
- int got = std::cin.gcount();
+ ssize_t got = std::cin.gcount();
if (got > 0)
{