[PATCH] build: enable -Wtype-limits

Aleksander Morgado aleksander at aleksander.es
Tue Dec 11 09:04:16 UTC 2018


On Mon, Dec 10, 2018 at 7:56 PM Ben Chan <benchan at chromium.org> wrote:
>
> -Wtype-limits helps catch unnecessary comparisons such as comparing
> unsigned variables <= 0.
>
> This patch essentially brings the list of compiler warnings defined in
> m4/compiler-warnings.m4 to be on par with libqmi.

Thanks, merged to git master.

> ---
>  m4/compiler-warnings.m4 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/m4/compiler-warnings.m4 b/m4/compiler-warnings.m4
> index eb78503..77b79c5 100644
> --- a/m4/compiler-warnings.m4
> +++ b/m4/compiler-warnings.m4
> @@ -15,7 +15,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
>                       -Wundef -Wimplicit-function-declaration \
>                       -Wpointer-arith -Winit-self -Wshadow \
>                       -Wmissing-include-dirs -Waggregate-return \
> -                     -Wformat-security; do
> +                     -Wformat-security -Wtype-limits; do
>                 SAVE_CFLAGS="$CFLAGS"
>                 CFLAGS="$CFLAGS $option"
>                 AC_MSG_CHECKING([whether gcc understands $option])
> --
> 2.20.0.rc2.403.gdbc3b29805-goog
>


-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list