Cast size_t to unsigned long for %lu

pull/4/head
Tatsuhiro Tsujikawa 2011-12-06 23:53:43 +09:00
parent 50a8549835
commit 9752704614
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ std::string HandshakeExtensionMessage::toString() const
getExtensionName().c_str(),
util::percentEncode(clientVersion_).c_str(),
tcpPort_,
metadataSize_));
static_cast<unsigned long>(metadataSize_)));
for(std::map<std::string, uint8_t>::const_iterator itr = extensions_.begin(),
eoi = extensions_.end(); itr != eoi; ++itr) {
const std::map<std::string, uint8_t>::value_type& vt = *itr;

View File

@ -127,7 +127,7 @@ InputIterator expandLoop
if(start <= end) {
std::string format;
if(minus-first == colon-minus-1) {
format = fmt("%%0%lud", minus-first);
format = fmt("%%0%lud", static_cast<unsigned long>(minus-first));
} else {
format = "%d";
}