Skip to content

Commit

Permalink
Fix warnings on 32-bit platforms.
Browse files Browse the repository at this point in the history
Cherry-pick: 844ef6d
  • Loading branch information
chenshuo committed Oct 24, 2018
1 parent 8ab8871 commit 91c9da0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/procmon/procmon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <stdarg.h>
#include <stdio.h>
#include <sys/stat.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>

using namespace muduo;
using namespace muduo::net;
Expand Down Expand Up @@ -319,7 +321,8 @@ class Procmon : noncopyable
if (::lstat(namelist[i]->d_name, &stat) == 0)
{
Timestamp mtime(stat.st_mtime * Timestamp::kMicroSecondsPerSecond);
appendResponse("%c %9ld %s %s", getDirType(namelist[i]->d_type), stat.st_size,
int64_t size = stat.st_size;
appendResponse("%c %9" PRId64 " %s %s", getDirType(namelist[i]->d_type), size,
mtime.toFormattedString(/*showMicroseconds=*/false).c_str(),
namelist[i]->d_name);
if (namelist[i]->d_type == DT_LNK)
Expand Down

0 comments on commit 91c9da0

Please sign in to comment.