[PATCH 3/3] Add -Wstrict-null-sentinel to gdbsupport/warning.m4
Christian Biesinger via gdb-patches
gdb-patches@sourceware.org
Mon Feb 10 16:42:00 GMT 2020
On Mon, Feb 10, 2020 at 10:40 AM Simon Marchi <simon.marchi@efficios.com> wrote:
>
> Commit 85f0dd3ce ("[gdb] Fix -Wstrict-null-sentinel warnings") fixed
> some violations of -Wstrict-null-sentinel. If we want to enforce this
> warning, I think we should enable it in our warning.m4 file.
>
> gdbsupport/ChangeLog:
>
> * warning.m4: Add -Wstrict-null-sentinel.
> * configure: Re-generate.
>
> gdbserver/ChangeLog:
>
> * configure: Re-generate.
>
> gdb/ChangeLog:
>
> * configure: Re-generate.
> ---
> gdb/configure | 3 ++-
> gdbserver/configure | 3 ++-
> gdbsupport/configure | 3 ++-
> gdbsupport/warning.m4 | 3 ++-
> 4 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/gdb/configure b/gdb/configure
> index a1d150649729..2ce910c808ce 100755
> --- a/gdb/configure
> +++ b/gdb/configure
> @@ -16111,7 +16111,8 @@ build_warnings="-Wall -Wpointer-arith \
> -Wdeprecated-copy \
> -Wdeprecated-copy-dtor \
> -Wredundant-move \
> --Wmissing-declarations"
> +-Wmissing-declarations \
> +-Wstrict-null-sentinel"
>
> case "${host}" in
> *-*-mingw32*)
> diff --git a/gdbserver/configure b/gdbserver/configure
> index 4b9d7e3718fa..bd0e667af69b 100755
> --- a/gdbserver/configure
> +++ b/gdbserver/configure
> @@ -9815,7 +9815,8 @@ build_warnings="-Wall -Wpointer-arith \
> -Wdeprecated-copy \
> -Wdeprecated-copy-dtor \
> -Wredundant-move \
> --Wmissing-declarations"
> +-Wmissing-declarations \
> +-Wstrict-null-sentinel"
>
> case "${host}" in
> *-*-mingw32*)
> diff --git a/gdbsupport/configure b/gdbsupport/configure
> index 197749b5d0ca..1f7d72cc5852 100755
> --- a/gdbsupport/configure
> +++ b/gdbsupport/configure
> @@ -10853,7 +10853,8 @@ build_warnings="-Wall -Wpointer-arith \
> -Wdeprecated-copy \
> -Wdeprecated-copy-dtor \
> -Wredundant-move \
> --Wmissing-declarations"
> +-Wmissing-declarations \
> +-Wstrict-null-sentinel"
>
> case "${host}" in
> *-*-mingw32*)
> diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
> index e2b8a43ddbd5..75bc21ca4261 100644
> --- a/gdbsupport/warning.m4
> +++ b/gdbsupport/warning.m4
> @@ -50,7 +50,8 @@ build_warnings="-Wall -Wpointer-arith \
> -Wdeprecated-copy \
> -Wdeprecated-copy-dtor \
> -Wredundant-move \
> --Wmissing-declarations"
> +-Wmissing-declarations \
> +-Wstrict-null-sentinel"
Any thoughts on instead dong:
+-Wstrict-null-sentinel \
+"
so that future changes don't need to change the last line? Helps with blame too.
>
> case "${host}" in
> *-*-mingw32*)
> --
> 2.25.0
>
More information about the Gdb-patches
mailing list