configure: Make -Waddress-of-packed-member warnings be errors
PATCH 1/1 configure: Make -Waddress-of-packed-member warnings be errors
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.
--- configure | 1 - 1 file changed, 1 deletion(-)
configure +0 -1
@@ -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,
Signature · 1 line
2.20.1
Quoted 15 lines · Peter Maydell
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 <[email protected]>--- configure | 1 - 1 file changed, 1 deletion(-)configure +0
-0
configure gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" · line 1886
Quoted 7 lines
configure +0
-1@@ -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!
Laurent Vivier
AppliedQuoted 26 lines · Thomas Huth
Quoted 15 lines · Peter Maydell
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 <[email protected]>--- configure | 1 - 1 file changed, 1 deletion(-)configure +0
-0configure gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" · line 1886
Quoted 7 lines
configure +0
-1@@ -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!
Quoted 2 lines
Reviewed-by Thomas Huth <[email protected]>
Applied to my trivial-patches branch.
Thanks,
Laurent
Quoted 4 lines · Peter Maydell
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!
Quoted 2 lines
Signed-off-by Peter Maydell <[email protected]>
Quoted 17 lines
--- configure | 1 - 1 file changed, 1 deletion(-)configure +0
-1@@ -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,