forked from gregkh/usbutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis-autogen.sh
executable file
·53 lines (47 loc) · 1.38 KB
/
travis-autogen.sh
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
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright 2016 Stephan Linz <[email protected]>
# -Wsign-compare -Wtype-limits
# Warnings enabled
CFLAGS="-Wall -Wextra"
CFLAGS+=" -Wbad-function-cast"
#CFLAGS+=" -Wcast-align"
CFLAGS+=" -Wchar-subscripts"
CFLAGS+=" -Wempty-body"
CFLAGS+=" -Wformat=2"
#CFLAGS+=" -Wformat"
#CFLAGS+=" -Wformat-nonliteral"
#CFLAGS+=" -Wformat-security"
#CFLAGS+=" -Wformat-y2k"
CFLAGS+=" -Winit-self"
CFLAGS+=" -Winline"
CFLAGS+=" -Wmissing-declarations"
CFLAGS+=" -Wmissing-include-dirs"
CFLAGS+=" -Wmissing-prototypes"
CFLAGS+=" -Wnested-externs"
CFLAGS+=" -Wold-style-definition"
CFLAGS+=" -Wpointer-arith"
CFLAGS+=" -Wredundant-decls"
CFLAGS+=" -Wshadow"
CFLAGS+=" -Wstrict-prototypes"
CFLAGS+=" -Wswitch-enum"
CFLAGS+=" -Wundef"
CFLAGS+=" -Wuninitialized"
CFLAGS+=" -Wunused"
CFLAGS+=" -Wunused-variable"
CFLAGS+=" -Wsign-compare"
CFLAGS+=" -Wtype-limits"
CFLAGS+=" -Wwrite-strings"
# clang only: CFLAGS+=" -fdiagnostics-color=auto"
# warnings disabled on purpose
CFLAGS+=" -Wno-unused-parameter"
CFLAGS+=" -Wno-unused-function"
CFLAGS+=" -Wno-deprecated-declarations"
# should be removed and the code fixed
CFLAGS+=" -Wno-incompatible-pointer-types-discards-qualifiers"
CFLAGS+=" -Wno-missing-field-initializers"
# fails on warning -- leave it diesabled; not all flags are
# compatible with both compiler (gcc/clang)
#CFLAGS+=" -Werror"
export CFLAGS
./autogen.sh "$@"