From: Paul Donald Date: Sat, 25 Oct 2025 16:24:35 +0000 (+0200) Subject: cmake: disable pedantic X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=8d052c52e18dcb097c750765d8d2d8d7d33f2075;p=project%2Fodhcp6c.git cmake: disable pedantic 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 Link: https://github.com/openwrt/odhcp6c/pull/109 Signed-off-by: Álvaro Fernández Rojas --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c4c8c2b..2db50cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,6 @@ target_compile_options(${PROJECT_NAME} PRIVATE -g3) 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)