Configure: add -Wmisleading-indentation to strict warnings flags.
The warning flag in question was added in GCC version 6, hence addition has to be conditional. Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4401)
This commit is contained in:
parent
8545051c36
commit
6d50589c04
1 changed files with 6 additions and 2 deletions
|
@ -148,6 +148,7 @@ my $clang_devteam_warn = ""
|
|||
. " -Wconditional-uninitialized"
|
||||
. " -Wincompatible-pointer-types-discards-qualifiers"
|
||||
. " -Wmissing-variable-declarations"
|
||||
. " -Wno-unknown-warning-option"
|
||||
;
|
||||
|
||||
# This adds backtrace information to the memory leak info. Is only used
|
||||
|
@ -1327,8 +1328,11 @@ if (defined($predefined{__clang__}) && !$disabled{asm}) {
|
|||
if ($strict_warnings)
|
||||
{
|
||||
my $wopt;
|
||||
die "ERROR --strict-warnings requires gcc or gcc-alike"
|
||||
unless defined($predefined{__GNUC__});
|
||||
my $gccver = $predefined{__GNUC__} // -1;
|
||||
|
||||
die "ERROR --strict-warnings requires gcc[>=4] or gcc-alike"
|
||||
unless $gccver >= 4;
|
||||
$gcc_devteam_warn .= " -Wmisleading-indentation" if $gccver >= 6;
|
||||
foreach $wopt (split /\s+/, $gcc_devteam_warn)
|
||||
{
|
||||
$config{cflags} .= " $wopt" unless ($config{cflags} =~ /(?:^|\s)$wopt(?:\s|$)/)
|
||||
|
|
Loading…
Reference in a new issue