From: Kefu Chai Date: Wed, 17 Aug 2016 10:57:30 +0000 (+0800) Subject: rgw: silence a compiling warning X-Git-Tag: v11.0.1~424^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10751%2Fhead;p=ceph.git rgw: silence a compiling warning printf() a uint64 in a portable way (i.e. C98 compliant way). Signed-off-by: Kefu Chai --- diff --git a/src/rgw/rgw_torrent.cc b/src/rgw/rgw_torrent.cc index f4f930b0342..e85ac8f8637 100644 --- a/src/rgw/rgw_torrent.cc +++ b/src/rgw/rgw_torrent.cc @@ -253,7 +253,7 @@ void seed::do_encode() dencode.bencode(PIECE_LENGTH, info.piece_length, bl); char info_sha[100] = { 0 }; - sprintf(info_sha, "%ld", sha_len); + sprintf(info_sha, "%" PRIu64, sha_len); string sha_len_str = info_sha; dencode.bencode_key(PIECES, bl); bl.append(sha_len_str.c_str(), sha_len_str.length());