blob: 0dbd5dbee16c31e39c358f69a4f030df26619934 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# AM_STRICT
# Per compiler-version flags used when compiling in strict mode.
# GCC warnings.
AC_DEFUN([AM_GCC_WARNINGS], [
w="$w -Wall -Wextra -Werror"
w="$w -Waggregate-return"
w="$w -Wbad-function-cast"
w="$w -Wcast-align"
w="$w -Wdeclaration-after-statement"
w="$w -Wdouble-promotion"
w="$w -Wfloat-equal"
w="$w -Wformat-nonliteral"
w="$w -Wformat-security"
w="$w -Wformat=2"
w="$w -Winit-self"
w="$w -Wjump-misses-init"
w="$w -Wmissing-declarations"
w="$w -Wmissing-field-initializers"
w="$w -Wmissing-parameter-type"
w="$w -Wmissing-prototypes"
w="$w -Wnested-externs"
w="$w -Wold-style-definition"
w="$w -Wpacked"
w="$w -Wpointer-arith"
w="$w -Wpointer-sign"
w="$w -Wredundant-decls"
w="$w -Wshadow"
w="$w -Wsign-conversion"
w="$w -Wstrict-prototypes"
w="$w -Wswitch-enum"
w="$w -Wundef"
w="$w -Wunreachable-code"
w="$w -Wunsafe-loop-optimizations"
w="$w -Wunused"
w="$w -Wwrite-strings"
# Non-fatal informational warnings.
w="$w -Wno-error=inline"
w="$w -Wno-error=unsafe-loop-optimizations"
wt_cv_strict_warnings="$w"
])
# Clang warnings.
AC_DEFUN([AM_CLANG_WARNINGS], [
w="-Weverything -Werror"
w="$w -Wno-cast-align"
w="$w -Wno-documentation-unknown-command"
w="$w -Wno-format-nonliteral"
w="$w -Wno-packed"
w="$w -Wno-padded"
w="$w -Wno-reserved-id-macro"
w="$w -Wno-zero-length-array"
# We should turn on cast-qual, but not as a fatal error: see WT-2690.
# For now, turn it off.
# w="$w -Wno-error=cast-qual"
w="$w -Wno-cast-qual"
# Older OS X releases need some special love; these flags should be
# removed in the not-too-distant future.
# Apple clang version 4.1
# (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
w="$w -Wno-attributes"
w="$w -Wno-pedantic"
w="$w -Wno-unused-command-line-argument"
# Ignore unrecognized options.
w="$w -Wno-unknown-warning-option"
wt_cv_strict_warnings="$w"
])
|