-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglint.sh
More file actions
56 lines (52 loc) · 2.24 KB
/
glint.sh
File metadata and controls
56 lines (52 loc) · 2.24 KB
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
: "@(#)$Id: glint.sh,v 1.5 2002/08/09 21:40:52 jleffler Exp jleffler $"
#
# Use GCC as excruciatingly pedantic lint
# Not a complete replacement for lint -- it doesn't do inter-file checking.
# Now configurable via the environment.
# Use GLINT_EXTRA_FLAGS to set extra flags via the environment.
# NB: much Solaris code won't work with -undef enabled.
: ${GLINT_GCC:='gcc'}
: ${GLINT_ANSI='-std=c99'}
: ${GLINT_FNO_COMMON='-fno-common'}
: ${GLINT_FSHORT_ENUMS='-fshort-enums'}
: ${GLINT_PEDANTIC='-pedantic'}
: ${GLINT_UNDEF='-undef'}
: ${GLINT_W='-W'}
: ${GLINT_WAGGREGATE_RETURN='-Waggregate-return'}
: ${GLINT_WALL='-Wall'}
: ${GLINT_WCAST_ALIGN='-Wcast-align'}
: ${GLINT_WCAST_QUAL='-Wcast-qual'}
: ${GLINT_WCONVERSION='-Wconversion'}
: ${GLINT_WMISSING_DECLARATIONS='-Wmissing-declarations'}
: ${GLINT_WREDUNDANT_DECLS='-Wredundant-decls'}
: ${GLINT_WMISSING_PROTOTYPES='-Wmissing-prototypes'}
: ${GLINT_WNESTED_EXTERNS='-Wnested-externs'}
: ${GLINT_WPOINTER_ARITH='-Wpointer-arith'}
: ${GLINT_WSHADOW='-Wshadow'}
: ${GLINT_WSTRICT_PROTOTYPES='-Wstrict-prototypes'}
: # ${GLINT_WTRADITIONAL='-Wtraditional'}
: ${GLINT_WWRITE_STRINGS='-Wwrite-strings'}
echo "${GLINT_GCC} ${GLINT_ANSI} ${GLINT_FNO_COMMON} ${GLINT_FSHORT_ENUMS} ${GLINT_PEDANTIC} ${GLINT_UNDEF} ${GLINT_WAGGREGATE_RETURN} ${GLINT_WALL} ${GLINT_WCAST_ALIGN} ${GLINT_WCAST_QUAL} ${GLINT_WCONVERSION} ${GLINT_WMISSING_DECLARATIONS} ${GLINT_WREDUNDANT_DECLS} ${GLINT_WMISSING_PROTOTYPES} ${GLINT_WNESTED_EXTERNS} ${GLINT_WPOINTER_ARITH} ${GLINT_WSHADOW} ${GLINT_WSTRICT_PROTOTYPES} ${GLINT_WTRADITIONAL} ${GLINT_WWRITE_STRINGS} ${GLINT_W} ${GLINT_EXTRA_FLAGS} -o /dev/null -O4 -g -c $*"
exec ${GLINT_GCC} \
${GLINT_ANSI} \
${GLINT_FNO_COMMON} \
${GLINT_FSHORT_ENUMS} \
${GLINT_PEDANTIC} \
${GLINT_UNDEF} \
${GLINT_WAGGREGATE_RETURN} \
${GLINT_WALL} \
${GLINT_WCAST_ALIGN} \
${GLINT_WCAST_QUAL} \
${GLINT_WCONVERSION} \
${GLINT_WMISSING_DECLARATIONS} \
${GLINT_WREDUNDANT_DECLS} \
${GLINT_WMISSING_PROTOTYPES} \
${GLINT_WNESTED_EXTERNS} \
${GLINT_WPOINTER_ARITH} \
${GLINT_WSHADOW} \
${GLINT_WSTRICT_PROTOTYPES} \
${GLINT_WTRADITIONAL} \
${GLINT_WWRITE_STRINGS} \
${GLINT_W} \
${GLINT_EXTRA_FLAGS} \
-o /dev/null -O4 -g -c $*