summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-08-16 11:38:46 -0700
committerSage Weil <sage@inktank.com>2013-01-15 19:21:21 -0800
commit40e0f2dbfcc8c118dfb69f6dbb2913346db964ee (patch)
tree039fabbc974553a0b6574846542e87745f3046bc
parentdde83262c1f74dee4ccc09b11b57254c2c3990fc (diff)
downloadceph-40e0f2dbfcc8c118dfb69f6dbb2913346db964ee.tar.gz
byteorder: fix gcc 4.7 warnings
./include/encoding.h: In function 'void encode(int64_t, ceph::bufferlist&, uint64_t)': ./include/encoding.h:101:1: warning: narrowing conversion of 'v' from 'int64_t {aka long int}' to '__le64 {aka long long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing] Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/include/byteorder.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/byteorder.h b/src/include/byteorder.h
index 797e561a885..f8c74991e7a 100644
--- a/src/include/byteorder.h
+++ b/src/include/byteorder.h
@@ -81,9 +81,9 @@ MAKE_LE_CLASS(32)
MAKE_LE_CLASS(16)
#undef MAKE_LE_CLASS
-#define init_le64(x) { mswab64(x) }
-#define init_le32(x) { mswab32(x) }
-#define init_le16(x) { mswab16(x) }
+#define init_le64(x) { (__u64)mswab64(x) }
+#define init_le32(x) { (__u32)mswab32(x) }
+#define init_le16(x) { (__u16)mswab16(x) }
/*
#define cpu_to_le64(x) (x)