Trim tailing spaces and convert tabs to spaces.
This commit is contained in:
parent
4928dc52bb
commit
fc54e6acc4
|
@ -3701,30 +3701,30 @@ private:
|
||||||
void localvarUnusedGoto() {
|
void localvarUnusedGoto() {
|
||||||
// #4447
|
// #4447
|
||||||
functionVariableUsage("bool f(const int &i) {\n"
|
functionVariableUsage("bool f(const int &i) {\n"
|
||||||
" int X = i;\n"
|
" int X = i;\n"
|
||||||
"label:\n"
|
"label:\n"
|
||||||
" if ( X == 0 ) {\n"
|
" if ( X == 0 ) {\n"
|
||||||
" X -= 101;\n"
|
" X -= 101;\n"
|
||||||
" return true;\n"
|
" return true;\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" if ( X < 1001 ) {\n"
|
" if ( X < 1001 ) {\n"
|
||||||
" X += 1;\n"
|
" X += 1;\n"
|
||||||
" goto label;\n"
|
" goto label;\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" return false;\n"
|
" return false;\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
// #4558
|
// #4558
|
||||||
functionVariableUsage("int f() {\n"
|
functionVariableUsage("int f() {\n"
|
||||||
" int i,j=0;\n"
|
" int i,j=0;\n"
|
||||||
" start:\n"
|
" start:\n"
|
||||||
" i=j;\n"
|
" i=j;\n"
|
||||||
" i++;\n"
|
" i++;\n"
|
||||||
" j=i;\n"
|
" j=i;\n"
|
||||||
" if (i<3)\n"
|
" if (i<3)\n"
|
||||||
" goto start;\n"
|
" goto start;\n"
|
||||||
" return i;\n"
|
" return i;\n"
|
||||||
"}");
|
"}");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [[ "`./cppcheck --showtime=top5 cli/cmdlineparser.h --quiet | wc -l`" != 7 ]] ; then
|
if [[ "`./cppcheck --showtime=top5 cli/cmdlineparser.h --quiet | wc -l`" != 7 ]] ; then
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -16,16 +16,16 @@ make clean
|
||||||
git reset --hard HEAD > times.log
|
git reset --hard HEAD > times.log
|
||||||
|
|
||||||
for i in `seq 1 50`; do
|
for i in `seq 1 50`; do
|
||||||
git_head=`git log -1 --format=%h`
|
git_head=`git log -1 --format=%h`
|
||||||
# if build fails, make clean and try again
|
# if build fails, make clean and try again
|
||||||
make SRCDIR=build CXXFLAGS=-O2 -j4 || make clean ; make SRCDIR=build CXXFLAGS=-O2 -j4
|
make SRCDIR=build CXXFLAGS=-O2 -j4 || make clean ; make SRCDIR=build CXXFLAGS=-O2 -j4
|
||||||
echo "Run number $i"
|
echo "Run number $i"
|
||||||
./cppcheck -q --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
./cppcheck -q --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
||||||
./cppcheck -q --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
./cppcheck -q --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
||||||
./cppcheck -q --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
./cppcheck -q --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
||||||
./cppcheck -q --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
./cppcheck -q --showtime=summary --enable=all --inconclusive src 2> /dev/null | tee -a times.log
|
||||||
grep "Overall" times.log | tail -4 | sed s/s// | awk -v "i=$i" -v "git_head=$git_head" '{ sum+=$3} END {print "Run " i", "git_head " Average: " sum/4}' | tee -a times.log
|
grep "Overall" times.log | tail -4 | sed s/s// | awk -v "i=$i" -v "git_head=$git_head" '{ sum+=$3} END {print "Run " i", "git_head " Average: " sum/4}' | tee -a times.log
|
||||||
git reset --hard HEAD^1 | tee -a times.log
|
git reset --hard HEAD^1 | tee -a times.log
|
||||||
done
|
done
|
||||||
|
|
||||||
gcc -o tools/times tools/times.c
|
gcc -o tools/times tools/times.c
|
||||||
|
|
Loading…
Reference in New Issue