-
Notifications
You must be signed in to change notification settings - Fork 48
/
warnings.mk
57 lines (50 loc) · 1.15 KB
/
warnings.mk
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
#
# $Id$
#
# Copyright 2011, Juniper Networks, Inc.
# All rights reserved.
# This SOFTWARE is licensed under the LICENSE provided in the
# ../Copyright file. By downloading, installing, copying, or otherwise
# using the SOFTWARE, you agree to be bound by the terms of that
# LICENSE.
#
# Commonly used sets of warnings
#
MIN_WARNINGS?= -W -Wall
LOW_WARNINGS?= ${MIN_WARNINGS} \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wpointer-arith
MEDIUM_WARNINGS?= ${LOW_WARNINGS} -Werror
HIGH_WARNINGS?= ${MEDIUM_WARNINGS} \
-Waggregate-return \
-Wcast-align \
-Wcast-qual \
-Wchar-subscripts \
-Wcomment \
-Wformat \
-Wimplicit \
-Wmissing-declarations \
-Wnested-externs \
-Wparentheses \
-Wreturn-type \
-Wshadow \
-Wswitch \
-Wtrigraphs \
-Wuninitialized \
-Wunused \
-Wwrite-strings
HIGHER_WARNINGS?= ${HIGH_WARNINGS} \
-Winline \
-Wbad-function-cast \
-Wpacked \
-Wpadded \
-Wstrict-aliasing
ifeq "${LIBXO_WARNINGS}" "HIGH"
WARNINGS += ${HIGH_WARNINGS}
else
WARNINGS += ${LOW_WARNINGS}
endif
ifeq "${GCC_WARNINGS}" "yes"
WARNINGS += -fno-inline-functions-called-once
endif