diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2022-06-06 22:23:51 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2022-06-06 22:40:23 +0200 |
commit | 29083a76efa600b02d30f32d0393ae53e37887f8 (patch) | |
tree | 28cfa31234b98b9a7b495c09cac7cad5888cf81e | |
parent | b3cf30ba5b47dfa7414416fe3bc5ae34db6065e7 (diff) | |
download | sparse-29083a76efa600b02d30f32d0393ae53e37887f8.tar.gz |
cgcc: do not die on '-x assembler'
Currently cgcc will die if the option '-x' is used with any argument
other than 'c'.
It makes sense since sparse can only handle C files but it can be
useful in a project to simply use something like:
make CC=cgcc
So, instead of die()ing, avoid calling sparse if such '-x' option
is used, like already done by default for non .c files.
Original-patch-by: Tom Rix <trix@redhat.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rwxr-xr-x | cgcc | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -42,11 +42,10 @@ while (@ARGV) { $nargs = 1; } - # Ignore the extension if '-x c' is given. + # We don't want to run the checker on non-C files. if ($_ eq '-x') { die ("$0: missing argument for $_") if !@ARGV; - die ("$0: invalid argument for $_") if $ARGV[0] ne 'c'; - $do_check = 1; + $do_check = ($ARGV[0] eq 'c'); $nargs = 1; } |