You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
msgpack/msgpack-1.3.0-arm-char.patch

26 lines
953 B

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;
}
}
};