On Tue, Feb 20, 2018 at 02:26:47PM +0100, Martin Wilck wrote:
> Casting "const" away is often an indicator for wrong code.
> Add a compiler flag to warn about such possible breakage.
> 

Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com>

> Signed-off-by: Martin Wilck <mwi...@suse.com>
> ---
>  Makefile.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile.inc b/Makefile.inc
> index eb99c36010c1..a5b9d4e3fa74 100644
> --- a/Makefile.inc
> +++ b/Makefile.inc
> @@ -87,6 +87,7 @@ STACKPROT := $(call 
> TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
>  OPTFLAGS     = -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int \
>                 -Werror=implicit-function-declaration -Werror=format-security 
> \
>                 -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered \
> +               -Werror=cast-qual -Werror=discarded-qualifiers \
>                 -Wp,-D_FORTIFY_SOURCE=2 $(STACKPROT) \
>                 --param=ssp-buffer-size=4
>  
> -- 
> 2.16.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to