parent
6f90dfd106
commit
c28f978e6a
@ -0,0 +1,25 @@
|
|||||||
|
Index: msgpack-1.3.0/include/msgpack/adaptor/int.hpp
|
||||||
|
===================================================================
|
||||||
|
--- msgpack-1.3.0.orig/include/msgpack/adaptor/int.hpp
|
||||||
|
+++ msgpack-1.3.0/include/msgpack/adaptor/int.hpp
|
||||||
|
@@ -70,13 +70,17 @@ namespace detail {
|
||||||
|
template <>
|
||||||
|
struct object_char_sign<true> {
|
||||||
|
static inline void make(msgpack::object& o, char v) {
|
||||||
|
- if (v < 0) {
|
||||||
|
+ // Since char is unsigned on ARM, the condition below
|
||||||
|
+ // always evaluates to true and causes error if
|
||||||
|
+ // -Werror=type-limits is enabled.
|
||||||
|
+ int v2 = v;
|
||||||
|
+ if (v2 < 0) {
|
||||||
|
o.type = msgpack::type::NEGATIVE_INTEGER;
|
||||||
|
- o.via.i64 = v;
|
||||||
|
+ o.via.i64 = v2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
o.type = msgpack::type::POSITIVE_INTEGER;
|
||||||
|
- o.via.u64 = v;
|
||||||
|
+ o.via.u64 = v2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in new issue