This flag breaks compilation with ubus on aarch64/arm/x86.
The only platform which compiles successfully is mips.
/home/runner/work/odhcp6c/odhcp6c/build/include/libubox/utils.h:126:31: error: invalid application of ‘sizeof’ to a void type [-Werror=pointer-arith]
126 | (sizeof(int) == sizeof(*(1 ? ((void*)((long)(x) * 0l)) : (int*)1)))
| ^
/home/runner/work/odhcp6c/odhcp6c/build/include/libubox/utils.h:140:31: note: in expansion of macro ‘__is_constant’
140 | __builtin_choose_expr(__is_constant(x), \
| ^~~~~~~~~~~~~
/home/runner/work/odhcp6c/odhcp6c/build/include/libubox/utils.h:167:24: note: in expansion of macro ‘__eval_safe’
167 | #define be32_to_cpu(x) __eval_safe(__constant_swap32, x)
| ^~~~~~~~~~~
Signed-off-by: Paul Donald <[email protected]>
Link: https://github.com/openwrt/odhcp6c/pull/109
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
target_compile_options(${PROJECT_NAME} PRIVATE -Os)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall)
target_compile_options(${PROJECT_NAME} PRIVATE -Werror)
-target_compile_options(${PROJECT_NAME} PRIVATE -pedantic)
target_compile_options(${PROJECT_NAME} PRIVATE -Wextra)
target_compile_options(${PROJECT_NAME} PRIVATE -Werror=implicit-function-declaration)
target_compile_options(${PROJECT_NAME} PRIVATE -Wformat)