diff options
| author | Igor Burago <igor@igorburago.com> | 2023-12-18 15:12:48 +0800 |
|---|---|---|
| committer | Dan Cross <crossd@gmail.com> | 2023-12-18 10:10:55 -0500 |
| commit | 0bc1ff0fa0c68da2031c5c92768a150a35294b80 (patch) | |
| tree | 1852359c6bcf56aefa9f54d4420b613a86f39a2e /bin/9c | |
| parent | 984c2824e3569479bace65bdaf9e78a2eb36dd58 (diff) | |
| download | plan9port-0bc1ff0fa0c68da2031c5c92768a150a35294b80.tar.gz plan9port-0bc1ff0fa0c68da2031c5c92768a150a35294b80.zip | |
9l: refactor the warning-silencing mechanics to match that of 9c
Diffstat (limited to 'bin/9c')
| -rwxr-xr-x | bin/9c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,6 +1,6 @@ #!/bin/sh -test -f $PLAN9/config && . $PLAN9/config +test -f "$PLAN9/config" && . "$PLAN9/config" usegcc() { cc=${CC9:-gcc} @@ -52,7 +52,7 @@ quiet() ignore=$ignore'|warn_unused_result' ignore=$ignore'|expanded from macro' - grep -v '__p9l_autolib_' $1 | + grep -v '__p9l_autolib_' "$1" | egrep -v "$ignore" | sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' | $(which uniq) 1>&2 # avoid built-in uniq on SunOS @@ -143,10 +143,10 @@ case "$tag" in exit 1 esac -# N.B. Must use temp file to avoid pipe; pipe loses status. +# Must use temp file to avoid pipe; pipe loses status. xtmp=${TMPDIR-/tmp}/9c.$$.$USER.out -$cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>$xtmp +$cc -DPLAN9PORT -I"$PLAN9/include" $cflags "$@" 2>"$xtmp" status=$? -quiet $xtmp -rm -f $xtmp +quiet "$xtmp" +rm -f "$xtmp" exit $status |
