Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -Werror=class-memaccess with gcc8 #659

Merged
merged 1 commit into from Apr 4, 2018
Merged

Fix -Werror=class-memaccess with gcc8 #659

merged 1 commit into from Apr 4, 2018

Conversation

kraj
Copy link
Contributor

@kraj kraj commented Apr 2, 2018

Casting to void* make gcc happy since its upset about
object types and rightly so

Fixes

'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]

Signed-off-by: Khem Raj raj.khem@gmail.com

Casting to void* make gcc happy since its upset about
object types and rightly so

Fixes

'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]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
@redboltz redboltz merged commit a05d92a into msgpack:master Apr 4, 2018
@redboltz
Copy link
Contributor

redboltz commented Apr 4, 2018

@kraj , thank you for sending the PR. merged.

@jamessan
Copy link
Contributor

jamessan commented May 5, 2018

It would be helpful to have a release with this fix, since GCC 8 is starting to be the default GCC version in various distributions.

@redboltz
Copy link
Contributor

redboltz commented May 9, 2018

@jamessan , I will release the next version soon.

@cpraehaus
Copy link

Hi,

We just stumbled upon the same problem in v1.4.2 after upgrading to Ubuntu 18 and switching to gcc 8. Is it possible to also merge this fix into cpp-1.4 branch? We can also offer a pull request if that eases things for you.

BTW: thanks for your great work with the msgpack library!

Thanks and kind regards,
Christian.

@redboltz
Copy link
Contributor

@cpraehaus, the current major version of msgpack-c is 3. v1.4.2 is very old. I don't recommend using it.
But if you post the pull request for v1.4.2, I can merge it. You need to pass travis-ci and appveyor. They automatically run when you post the pull request.

StevenMaude added a commit to sensiblecodeio/pdf2msgpack that referenced this pull request Jul 2, 2019
msgpack-c commit: 29b9505cb76710802e130d5b8403ec1b40de1c8d

Required because of this fix: msgpack/msgpack-c#659

Alpine updated gcc from 6.4.0-r9 in Alpine 3.8 to 8.3.0-r0 so we now
encounter this problem.
StevenMaude added a commit to sensiblecodeio/pdf2msgpack that referenced this pull request Aug 4, 2020
msgpack-c commit: 29b9505cb76710802e130d5b8403ec1b40de1c8d

Required because of this fix: msgpack/msgpack-c#659

Alpine updated gcc from 6.4.0-r9 in Alpine 3.8 to 8.3.0-r0 so we now
encounter this problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants