summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-19 09:12:52 -0800
committerSage Weil <sage@inktank.com>2013-02-19 09:12:52 -0800
commit4002d70ac0bc68320a15aeaea6a80c2ee9ae8f21 (patch)
treed5d08a3a029b0e46643efeb6083ace1e46f16004
parentf80f84936ea905bfa366b58b9b75b1dd4e6fa7ce (diff)
downloadceph-4002d70ac0bc68320a15aeaea6a80c2ee9ae8f21.tar.gz
osd: fix printf warning on pg_log_entry_t::get_key_name
warning: osd/osd_types.cc:1716:76: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'version_t {aka long long unsigned int}' [-Wformat] warning: osd/osd_types.cc:1716:76: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'version_t {aka long long unsigned int}' [-Wformat] Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osd/osd_types.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc
index 8ef0c9b58a1..c3827a4680b 100644
--- a/src/osd/osd_types.cc
+++ b/src/osd/osd_types.cc
@@ -1713,7 +1713,7 @@ void pg_query_t::generate_test_instances(list<pg_query_t*>& o)
string pg_log_entry_t::get_key_name() const
{
char key[40];
- snprintf(key, sizeof(key), "%010u.%020lu", version.epoch, version.version);
+ snprintf(key, sizeof(key), "%010u.%020llu", version.epoch, (long long unsigned)version.version);
return string(key);
}