build-linux.m4: Fail compilation test on some warnings
[~tnikolova/compat/.git] / config / warning_filter.sh
1 #!/bin/bash
2
3 log_file=$1
4
5 echo_err()
6 {
7         echo -e "$@" 1>&2
8 }
9
10 regEx="(from incompatible pointer type|declared inside parameter list|is deprecated)"
11
12 cat $log_file 1>&2
13
14 if (grep -qE "$regEx" $log_file 2>/dev/null); then
15         echo_err "warning_filter.sh: treating warnings as errors!"
16         grep -E "$regEx" $log_file 1>&2
17         exit 1
18 fi
19
20 exit 0