Ludovic Rousseau | 765a1fb | 2016-02-27 17:17:24 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Warnings enabled |
| 4 | CFLAGS="-Wall -Wextra" |
| 5 | |
| 6 | CFLAGS+=" -Wbad-function-cast" |
| 7 | #CFLAGS+=" -Wcast-align" |
| 8 | CFLAGS+=" -Wchar-subscripts" |
| 9 | CFLAGS+=" -Wempty-body" |
| 10 | CFLAGS+=" -Wformat" |
| 11 | CFLAGS+=" -Wformat-security" |
| 12 | CFLAGS+=" -Winit-self" |
| 13 | CFLAGS+=" -Winline" |
| 14 | CFLAGS+=" -Wmissing-declarations" |
| 15 | CFLAGS+=" -Wmissing-include-dirs" |
| 16 | CFLAGS+=" -Wmissing-prototypes" |
| 17 | CFLAGS+=" -Wnested-externs" |
| 18 | CFLAGS+=" -Wold-style-definition" |
| 19 | CFLAGS+=" -Wpointer-arith" |
| 20 | CFLAGS+=" -Wredundant-decls" |
| 21 | CFLAGS+=" -Wshadow" |
| 22 | CFLAGS+=" -Wstrict-prototypes" |
| 23 | CFLAGS+=" -Wswitch-enum" |
| 24 | CFLAGS+=" -Wundef" |
| 25 | CFLAGS+=" -Wuninitialized" |
| 26 | CFLAGS+=" -Wunused" |
| 27 | CFLAGS+=" -Wwrite-strings" |
| 28 | CFLAGS+=" -fdiagnostics-color=auto" |
| 29 | |
| 30 | # warnings disabled on purpose |
| 31 | CFLAGS+=" -Wno-unused-parameter" |
| 32 | CFLAGS+=" -Wno-unused-function" |
| 33 | CFLAGS+=" -Wno-deprecated-declarations" |
| 34 | |
| 35 | # should be removed and the code fixed |
| 36 | CFLAGS+=" -Wno-incompatible-pointer-types-discards-qualifiers" |
| 37 | |
| 38 | # fails on warning |
| 39 | CFLAGS+=" -Werror" |
| 40 | |
| 41 | ./autogen.sh |