]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libxo/warnings.mk
sys/{x86,amd64}: remove one of doubled ;s
[FreeBSD/FreeBSD.git] / contrib / libxo / warnings.mk
1 #
2 # $Id$
3 #
4 # Copyright 2011, Juniper Networks, Inc.
5 # All rights reserved.
6 # This SOFTWARE is licensed under the LICENSE provided in the
7 # ../Copyright file. By downloading, installing, copying, or otherwise
8 # using the SOFTWARE, you agree to be bound by the terms of that
9 # LICENSE.
10 #
11 # Commonly used sets of warnings
12 #
13
14 MIN_WARNINGS?= -W -Wall
15
16 LOW_WARNINGS?= ${MIN_WARNINGS} \
17     -Wstrict-prototypes \
18     -Wmissing-prototypes \
19     -Wpointer-arith
20
21 MEDIUM_WARNINGS?= ${LOW_WARNINGS} -Werror
22
23 HIGH_WARNINGS?= ${MEDIUM_WARNINGS} \
24     -Waggregate-return \
25     -Wcast-align \
26     -Wcast-qual \
27     -Wchar-subscripts \
28     -Wcomment \
29     -Wformat \
30     -Wimplicit \
31     -Wmissing-declarations \
32     -Wnested-externs \
33     -Wparentheses \
34     -Wreturn-type \
35     -Wshadow \
36     -Wswitch \
37     -Wtrigraphs \
38     -Wuninitialized \
39     -Wunused \
40     -Wwrite-strings
41
42 HIGHER_WARNINGS?= ${HIGH_WARNINGS} \
43     -Winline \
44     -Wbad-function-cast \
45     -Wpacked \
46     -Wpadded \
47     -Wstrict-aliasing
48
49 ifeq "${LIBXO_WARNINGS}" "HIGH"
50 WARNINGS += ${HIGH_WARNINGS}
51 else
52 WARNINGS += ${LOW_WARNINGS}
53 endif
54
55 ifeq "${GCC_WARNINGS}" "yes"
56 WARNINGS += -fno-inline-functions-called-once
57 endif