From: Adam C. Emerson Date: Fri, 17 Jul 2020 06:44:31 +0000 (-0400) Subject: tools/cephfs: Explicitly convert to char X-Git-Tag: v16.1.0~1661^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be3d72740fe0d84257d72c58cd3312a3314e469e;p=ceph.git tools/cephfs: Explicitly convert to char Whether char is signed or not is implementation defined, and if char is signed converting 255 to a char will turn a positive value into a negative. Silence the warning by converting explicitly. Signed-off-by: Adam C. Emerson --- diff --git a/src/tools/cephfs/MetaTool.h b/src/tools/cephfs/MetaTool.h index 041e223b7de1..510be6552a87 100644 --- a/src/tools/cephfs/MetaTool.h +++ b/src/tools/cephfs/MetaTool.h @@ -21,7 +21,7 @@ class MetaTool : public MDSUtility public: class inode_meta_t { public: - inode_meta_t(snapid_t f = CEPH_NOSNAP, char t = 255, InodeStore* i = NULL): + inode_meta_t(snapid_t f = CEPH_NOSNAP, char t = char(255), InodeStore* i = NULL): _f(f),_t(t),_i(i) { }; snapid_t get_snapid() const {