aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgcc
diff options
authorThomas Graf <tgraf@suug.ch>2014-09-25 10:11:17 +0200
committerChristopher Li <sparse@chrisli.org>2014-09-28 08:58:55 +0800
commit4d8811879a1cc48c1cdd0b0466dc6865c715d149 (patch)
tree641f812c23f7cc7838d898c5c02db449679b63af /cgcc
parenta5bdeee9e145cc4313526f9722f80674321ab491 (diff)
downloadsparse-dev-4d8811879a1cc48c1cdd0b0466dc6865c715d149.tar.gz
sparse: Make -Werror turn warnigns into errors
Make sparse fail and return an error code if a warning is encountered and -Werror is specified or a hard error is found. This allows to use sparse in automated build systems to more easily catch new sparse warnings. The validation script is extended to parse the expected output message for an error message and validate the a non zero return value if such a error message is found. Also changes cgcc to die if the checker fails. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'cgcc')
-rwxr-xr-xcgcc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgcc b/cgcc
index c075e5f1..204bda35 100755
--- a/cgcc
+++ b/cgcc
@@ -70,7 +70,7 @@ if ($do_check) {
print "$check\n" if $verbose;
if ($do_compile) {
- system ($check);
+ system ($check) == 0 or die;
} else {
exec ($check);
}