From bf21c5a7b8147be3e921e434fe275038c8a4d818 Mon Sep 17 00:00:00 2001 From: Weibing Zhang Date: Fri, 14 Oct 2016 16:17:42 +0800 Subject: [PATCH] rgw: rgw_rados.cc fix shard_num format for snprintf Signed-off-by: Weibing Zhang --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 80ebc273c0f..5324654f5e8 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4863,7 +4863,7 @@ int RGWRados::time_log_trim(const string& oid, const real_time& start_time, cons string RGWRados::objexp_hint_get_shardname(int shard_num) { char buf[32]; - snprintf(buf, sizeof(buf), "%010u", shard_num); + snprintf(buf, sizeof(buf), "%010u", (unsigned)shard_num); string objname("obj_delete_at_hint."); return objname + buf;