]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common: avoid use of size_t in options
authorJames Page <james.page@ubuntu.com>
Wed, 29 May 2019 04:54:37 +0000 (05:54 +0100)
committerJames Page <james.page@ubuntu.com>
Wed, 29 May 2019 04:56:40 +0000 (05:56 +0100)
On 32 bit architectures size_t is not a 64 bit type
which causes comparison/assignment mismatch failures
during compilation - specifically in the handling of
legacy configuration values with boost::variant
records where size_t is not supported.

Signed-off-by: James Page <james.page@ubuntu.com>
src/common/config_values.h

index de1661ad10b82186e9bf50df794cc1e7a41dd074..0485824bead3d0e60eccd2aa3881b5fc968986db 100644 (file)
@@ -50,7 +50,7 @@ public:
 #define OPTION_OPT_U32(name) uint64_t name;
 #define OPTION_OPT_U64(name) uint64_t name;
 #define OPTION_OPT_UUID(name) uuid_d name;
-#define OPTION_OPT_SIZE(name) size_t name;
+#define OPTION_OPT_SIZE(name) uint64_t name;
 #define OPTION(name, ty)       \
   public:                      \
     OPTION_##ty(name)