Closed Cinek28 closed 1 year ago
Looks resolved in the meantime (closing the issue). Tried to force error/warning by applying explicit -Waddress-of-packed-member
flag no such warning appeared for any of the source files, test was conducted using:
Using built-in specs.
COLLECT_GCC=/opt/phoenix/arm-phoenix/bin/arm-phoenix-gcc
COLLECT_LTO_WRAPPER=/opt/phoenix-new/arm-phoenix/bin/../libexec/gcc/arm-phoenix/9.3.0/lto-wrapper
Target: arm-phoenix
Configured with: ../configure --target=arm-phoenix --prefix=/opt/phoenix/arm-phoenix --with-sysroot=/opt/phoenix/arm-phoenix/arm-phoenix --enable-languages=c,c++ --with-newlib --with-headers=yes --disable-tls --enable-initfini-array --disable-decimal-float --disable-libquadmath --disable-libssp --disable-nls
Thread model: single
gcc version 9.3.0 (GCC)
Toolchain build on 04/02/2022.
Update: additionally checked on ia32-generic with toolchain:
Using built-in specs.
COLLECT_GCC=/opt/phoenix/i386-pc-phoenix/bin/i386-pc-phoenix-gcc
COLLECT_LTO_WRAPPER=/opt/phoenix-new/i386-pc-phoenix/bin/../libexec/gcc/i386-pc-phoenix/9.3.0/lto-wrapper
Target: i386-pc-phoenix
Configured with: ../configure --target=i386-pc-phoenix --prefix=/opt/phoenix/i386-pc-phoenix --with-sysroot=/opt/phoenix/i386-pc-phoenix/i386-pc-phoenix --enable-languages=c,c++ --with-newlib --with-headers=yes --disable-tls --enable-initfini-array --disable-decimal-float --disable-libquadmath --disable-libssp --disable-nls
Thread model: single
gcc version 9.3.0 (GCC)
No warnings as in the issue description.
Commits resolving this issue: (libphoenix) https://github.com/phoenix-rtos/libphoenix/commit/fad1ce94cf875ceae650a840a2769c384a652853 (phoenix-rtos-devices) https://github.com/phoenix-rtos/phoenix-rtos-devices/commit/7be066ddd00a97b733cf94656ef3944269105d02
New warnings appear on build: -> warning: taking address of packed member of 'struct _flash_context_t' may result in an unaligned pointer value [-Waddress-of-packed-member] -> warning: taking address of packed member of 'struct _chunk_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
from: -> flashdrv.h -> malloc_dl.c