diff options
| -rw-r--r-- | meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Fix-Werror-class-memaccess.patch | 35 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb | 3 |
2 files changed, 37 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Fix-Werror-class-memaccess.patch b/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Fix-Werror-class-memaccess.patch new file mode 100644 index 0000000000..b0d772d937 --- /dev/null +++ b/meta-oe/recipes-devtools/msgpack/msgpack-c/0001-Fix-Werror-class-memaccess.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From a05d92ae85024d0648f69f95307a1d3e8e51109c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 1 Apr 2018 19:55:38 -0700 | ||
| 4 | Subject: [PATCH] Fix -Werror=class-memaccess | ||
| 5 | |||
| 6 | Casting to void* make gcc happy since its upset about | ||
| 7 | object types and rightly so | ||
| 8 | |||
| 9 | Fixes | ||
| 10 | |||
| 11 | 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'struct msgpack::v2::object' from an array of 'const msgpack_object' {aka 'const struct msgpack_object'} [-Werror=class-memaccess] | ||
| 12 | |||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | Upstream-Status: Submitted [https://github.com/msgpack/msgpack-c/pull/659] | ||
| 16 | |||
| 17 | include/msgpack/v1/object.hpp | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/include/msgpack/v1/object.hpp b/include/msgpack/v1/object.hpp | ||
| 21 | index 64da8c53..9721f705 100644 | ||
| 22 | --- a/include/msgpack/v1/object.hpp | ||
| 23 | +++ b/include/msgpack/v1/object.hpp | ||
| 24 | @@ -661,7 +661,7 @@ inline object::object(const msgpack_object& o) | ||
| 25 | inline void operator<< (msgpack::object& o, const msgpack_object& v) | ||
| 26 | { | ||
| 27 | // FIXME beter way? | ||
| 28 | - std::memcpy(&o, &v, sizeof(v)); | ||
| 29 | + std::memcpy(static_cast<void*>(&o), &v, sizeof(v)); | ||
| 30 | } | ||
| 31 | |||
| 32 | inline object::operator msgpack_object() const | ||
| 33 | -- | ||
| 34 | 2.16.3 | ||
| 35 | |||
diff --git a/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb b/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb index d9f6956690..02c0cd2964 100644 --- a/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb +++ b/meta-oe/recipes-devtools/msgpack/msgpack-c_2.1.5.bb | |||
| @@ -9,9 +9,10 @@ LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \ | |||
| 9 | 9 | ||
| 10 | PV .= "+git${SRCPV}" | 10 | PV .= "+git${SRCPV}" |
| 11 | 11 | ||
| 12 | SRCREV = "7a98138f27f27290e680bf8fbf1f8d1b089bf138" | 12 | SRCREV = "208595b2620cf6260ce3d6d4cf8543f13b206449" |
| 13 | 13 | ||
| 14 | SRC_URI = "git://github.com/msgpack/msgpack-c \ | 14 | SRC_URI = "git://github.com/msgpack/msgpack-c \ |
| 15 | file://0001-Fix-Werror-class-memaccess.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | inherit cmake pkgconfig | 18 | inherit cmake pkgconfig |
