From 909850eb2277c072e8420d71e1a4c53b48544085 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Wed, 25 Jun 2014 00:26:35 +0200 Subject: [PATCH] [werror] Fix c++11-compat-reserved-user-defined-literal c++11 readiness, avoid clash with http://www.stroustrup.com/C++11FAQ.html#UD-literals Signed-off-by: Thorsten Behrens --- src/cls/rbd/cls_rbd.cc | 10 +++++----- src/cls/rgw/cls_rgw.cc | 4 ++-- src/common/perf_counters.cc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index 55f5c747043..68d96062712 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -506,7 +506,7 @@ int get_protection_status(cls_method_context_t hctx, bufferlist *in, key_from_snap_id(snap_id.val, &snapshot_key); r = read_key(hctx, snapshot_key, &snap); if (r < 0) { - CLS_ERR("could not read key for snapshot id %"PRIu64, snap_id.val); + CLS_ERR("could not read key for snapshot id %" PRIu64, snap_id.val); return r; } @@ -573,7 +573,7 @@ int set_protection_status(cls_method_context_t hctx, bufferlist *in, key_from_snap_id(snap_id.val, &snapshot_key); r = read_key(hctx, snapshot_key, &snap); if (r < 0) { - CLS_ERR("could not read key for snapshot id %"PRIu64, snap_id.val); + CLS_ERR("could not read key for snapshot id %" PRIu64, snap_id.val); return r; } @@ -957,7 +957,7 @@ int add_child(cls_method_context_t hctx, bufferlist *in, bufferlist *out) if (r < 0) return r; - CLS_LOG(20, "add_child %s to (%"PRIu64", %s, %"PRIu64")", c_image_id.c_str(), + CLS_LOG(20, "add_child %s to (%" PRIu64 ", %s, %" PRIu64 ")", c_image_id.c_str(), p_pool_id, p_image_id.c_str(), p_snap_id.val); string key = parent_key(p_pool_id, p_image_id, p_snap_id); @@ -1011,7 +1011,7 @@ int remove_child(cls_method_context_t hctx, bufferlist *in, bufferlist *out) if (r < 0) return r; - CLS_LOG(20, "remove_child %s from (%"PRIu64", %s, %"PRIu64")", + CLS_LOG(20, "remove_child %s from (%" PRIu64 ", %s, %" PRIu64 ")", c_image_id.c_str(), p_pool_id, p_image_id.c_str(), p_snap_id.val); @@ -1072,7 +1072,7 @@ int get_children(cls_method_context_t hctx, bufferlist *in, bufferlist *out) if (r < 0) return r; - CLS_LOG(20, "get_children of (%"PRIu64", %s, %"PRIu64")", + CLS_LOG(20, "get_children of (%" PRIu64 ", %s, %" PRIu64 ")", p_pool_id, p_image_id.c_str(), p_snap_id.val); string key = parent_key(p_pool_id, p_image_id, p_snap_id); diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index cf301f7294d..005558a62f7 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -755,7 +755,7 @@ int rgw_dir_suggest_changes(cls_method_context_t hctx, bufferlist *in, bufferlis if (cur_disk.pending_map.empty()) { if (cur_disk.exists) { struct rgw_bucket_category_stats& old_stats = header.stats[cur_disk.meta.category]; - CLS_LOG(10, "total_entries: %"PRId64" -> %"PRId64"\n", old_stats.num_entries, old_stats.num_entries - 1); + CLS_LOG(10, "total_entries: %" PRId64 " -> %" PRId64 "\n", old_stats.num_entries, old_stats.num_entries - 1); old_stats.num_entries--; old_stats.total_size -= cur_disk.meta.size; old_stats.total_size_rounded -= get_rounded_size(cur_disk.meta.size); @@ -771,7 +771,7 @@ int rgw_dir_suggest_changes(cls_method_context_t hctx, bufferlist *in, bufferlis return ret; break; case CEPH_RGW_UPDATE: - CLS_LOG(10, "CEPH_RGW_UPDATE name=%s total_entries: %"PRId64" -> %"PRId64"\n", cur_change.name.c_str(), stats.num_entries, stats.num_entries + 1); + CLS_LOG(10, "CEPH_RGW_UPDATE name=%s total_entries: %" PRId64 " -> %" PRId64 "\n", cur_change.name.c_str(), stats.num_entries, stats.num_entries + 1); stats.num_entries++; stats.total_size += cur_change.meta.size; stats.total_size_rounded += get_rounded_size(cur_change.meta.size); diff --git a/src/common/perf_counters.cc b/src/common/perf_counters.cc index 61d893454ed..39df713b8c5 100644 --- a/src/common/perf_counters.cc +++ b/src/common/perf_counters.cc @@ -249,7 +249,7 @@ void PerfCounters::dump_formatted(Formatter *f, bool schema) f->dump_unsigned("sum", a.first); } else if (d->type & PERFCOUNTER_TIME) { f->dump_unsigned("avgcount", a.second); - f->dump_format_unquoted("sum", "%"PRId64".%09"PRId64, + f->dump_format_unquoted("sum", "%" PRId64 ".%09" PRId64, a.first / 1000000000ull, a.first % 1000000000ull); } else { @@ -261,7 +261,7 @@ void PerfCounters::dump_formatted(Formatter *f, bool schema) if (d->type & PERFCOUNTER_U64) { f->dump_unsigned(d->name, v); } else if (d->type & PERFCOUNTER_TIME) { - f->dump_format_unquoted(d->name, "%"PRId64".%09"PRId64, + f->dump_format_unquoted(d->name, "%" PRId64 ".%09" PRId64, v / 1000000000ull, v % 1000000000ull); } else {