]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix printf warning on pg_log_entry_t::get_key_name
authorSage Weil <sage@inktank.com>
Tue, 19 Feb 2013 17:12:52 +0000 (09:12 -0800)
committerSage Weil <sage@inktank.com>
Tue, 19 Feb 2013 17:12:52 +0000 (09:12 -0800)
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>
src/osd/osd_types.cc

index 8ef0c9b58a148f5e950fce949ad3b85fb4a58af6..c3827a4680b93f9acae7c9c025d5be9a2d803a5d 100644 (file)
@@ -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);
 }