]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include/encoding: fix compat version error message
authorXinying Song <songxinying@cloudin.cn>
Sat, 23 Dec 2017 06:44:26 +0000 (14:44 +0800)
committerDavid Zafman <dzafman@redhat.com>
Thu, 27 Sep 2018 03:17:23 +0000 (20:17 -0700)
The compatv parameter can not behave as expected.
Using std::to_string instead of a macro pound sign.
Signed-off-by: Xinying Song <songxinying@cloudin.cn>
(cherry picked from commit 74745ef43e585f47f528ea3ab78061dfd4707f46)

src/include/encoding.h

index 4889626f9097925d9136dea50e69a51edd839af9..4dd5be629bf5c24c6f13c1c0a771cc9bc0fde924 100644 (file)
@@ -1058,7 +1058,7 @@ decode(std::array<T, N>& v, bufferlist::iterator& p)
 #define ENCODE_FINISH(bl) ENCODE_FINISH_NEW_COMPAT(bl, 0)
 
 #define DECODE_ERR_OLDVERSION(func, v, compatv)                                        \
-  (std::string(func) + " no longer understand old encoding version " #v " < " #compatv)
+  (std::string(func) + " no longer understand old encoding version " #v " < " + std::to_string(compatv))
 
 #define DECODE_ERR_PAST(func) \
   (std::string(func) + " decode past end of struct encoding")