Re: With new gcc9 how to handle error from -Werror=address-of-packed-member

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Normand:

> With new gcc9 there are new error reported by
> -Werror=address-of-packed-member
> How to handle such error ?
>
> eg:
> libflash/ecc.c:419:24: error: taking address of packed member of
> 'struct ecc64' may result in an unaligned pointer value
> [-Werror=address-of-packed-member]
>   419 |   memcpy(inc_uint64_by(&ecc_word.data, alignment), src,
> bytes_wanted);
>       |                        ^~~~~~~~~~~~~~

What does the definition of struct ecc64 look like?

Thanks,
Florian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux