diff mbox series

[OpenWrt-Devel,libubox,1/9] enable extra compiler checks

Message ID 20191120115926.23272-2-ynezz@true.cz
State Superseded
Headers show
Series fixes, some unit tests and GitLab CI | expand

Commit Message

Petr Štetiar Nov. 20, 2019, 11:59 a.m. UTC
Let's enforce additional automatic checks enforced by the compiler in
order to catch possible errors during compilation.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonas Gorski Nov. 20, 2019, 1:29 p.m. UTC | #1
On Wed, 20 Nov 2019 at 13:00, Petr Štetiar <ynezz@true.cz> wrote:
>
> Let's enforce additional automatic checks enforced by the compiler in
> order to catch possible errors during compilation.

Does it still compile when only applying this patch? If not, you need
to move it to after fixing all issues it now warns about (and I guess
errors), to keep bisectability.

Regards
Jonas

>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>
> ---
>  CMakeLists.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 57804cf007bf..7a86854841e3 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -3,7 +3,7 @@ INCLUDE(CheckLibraryExists)
>  INCLUDE(CheckFunctionExists)
>
>  PROJECT(ubox C)
> -ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
> +ADD_DEFINITIONS(-Os -Wextra -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
>
>  OPTION(BUILD_LUA "build Lua plugin" ON)
>  OPTION(BUILD_EXAMPLES "build examples" ON)
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Petr Štetiar Nov. 20, 2019, 1:36 p.m. UTC | #2
Jonas Gorski <jonas.gorski@gmail.com> [2019-11-20 14:29:50]:

Hi,

> Does it still compile when only applying this patch? If not, you need
> to move it to after fixing all issues it now warns about (and I guess
> errors), to keep bisectability.

good point, thanks. I've reordered the commits.

-- ynezz
diff mbox series

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57804cf007bf..7a86854841e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@  INCLUDE(CheckLibraryExists)
 INCLUDE(CheckFunctionExists)
 
 PROJECT(ubox C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
+ADD_DEFINITIONS(-Os -Wextra -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
 
 OPTION(BUILD_LUA "build Lua plugin" ON)
 OPTION(BUILD_EXAMPLES "build examples" ON)