You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ patch -p1
+ make install
erasurecode_helpers.c: In function 'get_chksum':
erasurecode_helpers.c:499:25: error: taking address of packed member of 'struct fragment_metadata' may result in an unaligned pointer value [-Werror=address-of-packed-member]
499 | return (uint32_t *) header->meta.chksum;
| ^~~~~~
erasurecode_helpers.c: In function 'get_metadata_chksum':
erasurecode_helpers.c:530:12: error: taking address of packed member of 'struct fragment_header_s' may result in an unaligned pointer value [-Werror=address-of-packed-member]
530 | return (uint32_t *) &header->metadata_chksum;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:713: liberasurecode_la-erasurecode_helpers.lo] Error 1
Description
cargo build
generates the following error:Since GCC9, GCC reports warnings about taking the address of a packed member. See https://reviews.freebsd.org/D9069?id=23667.
Environment
GCC9 on Arch Linux
Solution
Add
-Wno-error=address-of-packed-member
to$CFLAGS
when built with gcc9 atinstall_deps.sh
.The text was updated successfully, but these errors were encountered: