mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Use -Wall -Wextra with clang
The disabled set of -Weverything is hard to maintain across versions. Use -Wall -Wextra but also document other useful warnings that currently trigger. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
323daa74fc
commit
13efe9d17e
@ -641,7 +641,14 @@
|
||||
"linux-x86_64-clang" => {
|
||||
inherit_from => [ "linux-x86_64" ],
|
||||
cc => "clang",
|
||||
cflags => "-m64 -DL_ENDIAN -Weverything $clang_disabled_warnings -Qunused-arguments",
|
||||
# TODO(openssl-team): fix problems and investigate if (at least) the
|
||||
# following warnings can also be enabled:
|
||||
# -Wconditional-uninitialized, -Wswitch-enum, -Wunused-macros,
|
||||
# -Wmissing-field-initializers, -Wmissing-variable-declarations,
|
||||
# -Wincompatible-pointer-types-discards-qualifiers, -Wcast-align,
|
||||
# -Wunreachable-code -Wunused-parameter -Wlanguage-extension-token
|
||||
# -Wextended-offsetof
|
||||
cflags => "-m64 -DL_ENDIAN -Wall -Wextra $clang_disabled_warnings -Qunused-arguments",
|
||||
},
|
||||
"linux-x32" => {
|
||||
inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
|
||||
|
@ -112,7 +112,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimenta
|
||||
|
||||
my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DDEBUG_UNUSED";
|
||||
|
||||
my $clang_disabled_warnings = "-Wno-language-extension-token -Wno-extended-offsetof -Wno-padded -Wno-shorten-64-to-32 -Wno-format-nonliteral -Wno-missing-noreturn -Wno-unused-parameter -Wno-sign-conversion -Wno-unreachable-code -Wno-conversion -Wno-documentation -Wno-missing-variable-declarations -Wno-cast-align -Wno-incompatible-pointer-types-discards-qualifiers -Wno-missing-variable-declarations -Wno-missing-field-initializers -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-conditional-uninitialized -Wno-switch-enum -Wno-gnu-statement-expression";
|
||||
my $clang_disabled_warnings = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof";
|
||||
|
||||
my $strict_warnings = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user