Re: [PATCH v2] Silence misguided GCC warning about alignment issues

2017-08-14 Thread Daniel Thompson
On 07/08/17 21:58, Johannes Schindelin wrote: When compiling xz_dec_stream.c with GCC (at least with versions 5.4.0 and 7.1.0), it complains thusly: In function 'dec_stream_footer': error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=s

Re: [PATCH v2] Silence misguided GCC warning about alignment issues

2017-08-10 Thread Ralf Friedl
Denys Vlasenko schrieb: On Mon, Aug 7, 2017 at 10:58 PM, Johannes Schindelin wrote: +++ b/archival/libarchive/decompress_unxz.c @@ -37,6 +37,11 @@ static uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc) || !defined(put_unaligned_be32) # error get_unaligned_le32 accessors a

Re: [PATCH v2] Silence misguided GCC warning about alignment issues

2017-08-10 Thread Denys Vlasenko
On Mon, Aug 7, 2017 at 10:58 PM, Johannes Schindelin wrote: > +++ b/archival/libarchive/decompress_unxz.c > @@ -37,6 +37,11 @@ static uint32_t xz_crc32(const uint8_t *buf, size_t size, > uint32_t crc) > || !defined(put_unaligned_be32) > # error get_unaligned_le32 accessors are not defined > #

[PATCH v2] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Johannes Schindelin
When compiling xz_dec_stream.c with GCC (at least with versions 5.4.0 and 7.1.0), it complains thusly: In function 'dec_stream_footer': error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] if (xz_crc32(s->temp.