diff mbox series

configure: Make -Waddress-of-packed-member warnings be errors

Message ID 20190208132112.31493-1-peter.maydell@linaro.org
State Superseded
Headers show
Series configure: Make -Waddress-of-packed-member warnings be errors | expand

Commit Message

Peter Maydell Feb. 8, 2019, 1:21 p.m. UTC
We have now managed to eradicate all the places in the codebase
that triggered clang's -Waddress-of-packed-member warning. Remove
the compiler flag that exempted it from our usual -Werror policy.
This will prevent any new problematic code being added in future.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 configure | 1 -
 1 file changed, 1 deletion(-)

-- 
2.20.1

Comments

Thomas Huth Feb. 8, 2019, 1:33 p.m. UTC | #1
On 2019-02-08 14:21, Peter Maydell wrote:
> We have now managed to eradicate all the places in the codebase

> that triggered clang's -Waddress-of-packed-member warning. Remove

> the compiler flag that exempted it from our usual -Werror policy.

> This will prevent any new problematic code being added in future.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> ---

>  configure | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/configure b/configure

> index fbd0825488c..50ac5d90f2e 100755

> --- a/configure

> +++ b/configure

> @@ -1881,7 +1881,6 @@ gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"

>  gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags"

>  gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags"

>  gcc_flags="-Wno-string-plus-int $gcc_flags"

> -gcc_flags="-Wno-error=address-of-packed-member $gcc_flags"

>  # Note that we do not add -Werror to gcc_flags here, because that would

>  # enable it for all configure tests. If a configure test failed due

>  # to -Werror this would just silently disable some features,


Great!

Reviewed-by: Thomas Huth <thuth@redhat.com>
Philippe Mathieu-Daudé Feb. 8, 2019, 3:21 p.m. UTC | #2
On 2/8/19 2:21 PM, Peter Maydell wrote:
> We have now managed to eradicate all the places in the codebase

> that triggered clang's -Waddress-of-packed-member warning. Remove

> the compiler flag that exempted it from our usual -Werror policy.

> This will prevent any new problematic code being added in future.


Yay!

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


> ---

>  configure | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/configure b/configure

> index fbd0825488c..50ac5d90f2e 100755

> --- a/configure

> +++ b/configure

> @@ -1881,7 +1881,6 @@ gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"

>  gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags"

>  gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags"

>  gcc_flags="-Wno-string-plus-int $gcc_flags"

> -gcc_flags="-Wno-error=address-of-packed-member $gcc_flags"

>  # Note that we do not add -Werror to gcc_flags here, because that would

>  # enable it for all configure tests. If a configure test failed due

>  # to -Werror this would just silently disable some features,

>
Laurent Vivier Feb. 14, 2019, 9:48 a.m. UTC | #3
On 08/02/2019 14:33, Thomas Huth wrote:
> On 2019-02-08 14:21, Peter Maydell wrote:

>> We have now managed to eradicate all the places in the codebase

>> that triggered clang's -Waddress-of-packed-member warning. Remove

>> the compiler flag that exempted it from our usual -Werror policy.

>> This will prevent any new problematic code being added in future.

>>

>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

>> ---

>>  configure | 1 -

>>  1 file changed, 1 deletion(-)

>>

>> diff --git a/configure b/configure

>> index fbd0825488c..50ac5d90f2e 100755

>> --- a/configure

>> +++ b/configure

>> @@ -1881,7 +1881,6 @@ gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"

>>  gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags"

>>  gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags"

>>  gcc_flags="-Wno-string-plus-int $gcc_flags"

>> -gcc_flags="-Wno-error=address-of-packed-member $gcc_flags"

>>  # Note that we do not add -Werror to gcc_flags here, because that would

>>  # enable it for all configure tests. If a configure test failed due

>>  # to -Werror this would just silently disable some features,

> 

> Great!

> 

> Reviewed-by: Thomas Huth <thuth@redhat.com>

> 


Applied to my trivial-patches branch.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/configure b/configure
index fbd0825488c..50ac5d90f2e 100755
--- a/configure
+++ b/configure
@@ -1881,7 +1881,6 @@  gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"
 gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags"
 gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags"
 gcc_flags="-Wno-string-plus-int $gcc_flags"
-gcc_flags="-Wno-error=address-of-packed-member $gcc_flags"
 # Note that we do not add -Werror to gcc_flags here, because that would
 # enable it for all configure tests. If a configure test failed due
 # to -Werror this would just silently disable some features,