mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Fix most instances of SC2086 warning
This commit is contained in:
parent
ce1b018ab7
commit
7c04b00e65
@ -8,9 +8,9 @@
|
|||||||
dst=$1
|
dst=$1
|
||||||
|
|
||||||
for fn in src/core/*/*.c src/feature/*/*.c src/app/*/*.c src/lib/*/*.c; do
|
for fn in src/core/*/*.c src/feature/*/*.c src/app/*/*.c src/lib/*/*.c; do
|
||||||
BN=$(basename $fn)
|
BN=$(basename "$fn")
|
||||||
DN=$(dirname $fn)
|
DN=$(dirname "$fn")
|
||||||
F=$(echo $BN | sed -e 's/\.c$//;')
|
F=$(echo "$BN" | sed -e 's/\.c$//;')
|
||||||
GC="${BN}.gcov"
|
GC="${BN}.gcov"
|
||||||
# Figure out the object file names
|
# Figure out the object file names
|
||||||
ONS=$(echo ${DN}/src_*-${F}.o)
|
ONS=$(echo ${DN}/src_*-${F}.o)
|
||||||
@ -20,18 +20,18 @@ for fn in src/core/*/*.c src/feature/*/*.c src/app/*/*.c src/lib/*/*.c; do
|
|||||||
then
|
then
|
||||||
for on in $ONS; do
|
for on in $ONS; do
|
||||||
# We should have a gcno file
|
# We should have a gcno file
|
||||||
GCNO=$(echo $on | sed -e 's/\.o$/\.gcno/;')
|
GCNO=$(echo "$on" | sed -e 's/\.o$/\.gcno/;')
|
||||||
if [ -e $GCNO ]
|
if [ -e "$GCNO" ]
|
||||||
then
|
then
|
||||||
# No need to test for gcda, since gcov assumes no execution
|
# No need to test for gcda, since gcov assumes no execution
|
||||||
# if it's absent
|
# if it's absent
|
||||||
rm -f $GC
|
rm -f "$GC"
|
||||||
gcov -o $on $fn
|
gcov -o "$on" "$fn"
|
||||||
if [ -e $GC ]
|
if [ -e "$GC" ]
|
||||||
then
|
then
|
||||||
if [ -d "$dst" ]
|
if [ -d "$dst" ]
|
||||||
then
|
then
|
||||||
mv $GC $dst/$GC
|
mv "$GC" "$dst"/"$GC"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "gcov -o $on $fn didn't make a .gcov file"
|
echo "gcov -o $on $fn didn't make a .gcov file"
|
||||||
|
Loading…
Reference in New Issue
Block a user