Merge pull request #312 from matthiaskrgr/travis

travis: compile one pair of jobs with -DCHECK_INTERNAL and run --enable=internal,...
This commit is contained in:
PKEuS 2014-05-19 22:36:45 +02:00
commit d3d3803ae4
3 changed files with 5 additions and 4 deletions

View File

@ -13,7 +13,7 @@ env:
# special CXXFLAGS for maximum speed, overrides global CXXFLAGS, CHECK_KERNEL is the var that controls if we download and check the kernel in that travis job
- MAKEFLAGS="HAVE_RULES=yes" SRCDIR=build VERIFY=1
- SRCDIR=build VERIFY=1
-
- CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL"
- CXXFLAGS="-O3 -march=native -mtune=native" SRCDIR=build CHECK_KERNEL=yes
matrix:
@ -46,7 +46,7 @@ script:
- cd ../
# use same hack as for kernel to work around cppchecks broken exit status with -j 2 ; create file, tee everything to the file and stdout, grep for errors in the file
- touch /tmp/cppcheck.cppcheck
- ./cppcheck --error-exitcode=1 -Ilib --enable=style --suppressions-list=.travis_suppressions . -j 2 |& tee /tmp/cppcheck.cppcheck
- ./cppcheck --error-exitcode=1 -Ilib --enable=style,performance,portability,warning,internal --suppressions-list=.travis_suppressions . -j 2 |& tee /tmp/cppcheck.cppcheck
- sh -c "! grep '^\[' /tmp/cppcheck.cppcheck"
- cd ./gui
# clean rebuild

View File

@ -2,6 +2,7 @@ uselessAssignmentPtrArg:build/checkstl.cpp
assertWithSideEffect:build/checkuninitvar.cpp
duplicateBranch:build/checkunusedvar.cpp
unusedPrivateFunction:test/testcmdlineparser.cpp
redundantNextPrevious:test/testtoken.cpp
*:gui/test*
*:test/test.cxx

View File

@ -951,7 +951,7 @@ static void valueFlowForLoopSimplify(Token * const bodyStart, const unsigned int
setTokenValue(tok2, value1);
}
else if (Token::Match(tok2, ") {") && Token::findmatch(tok2->link(), "%varid%", tok2, varid)) {
else if (Token::simpleMatch(tok2, ") {") && Token::findmatch(tok2->link(), "%varid%", tok2, varid)) {
if (Token::findmatch(tok2, "continue|break|return", tok2->linkAt(1), varid)) {
if (settings->debugwarnings)
bailout(tokenlist, errorLogger, tok2, "For loop variable bailout on conditional continue|break|return");
@ -960,7 +960,7 @@ static void valueFlowForLoopSimplify(Token * const bodyStart, const unsigned int
if (settings->debugwarnings)
bailout(tokenlist, errorLogger, tok2, "For loop variable skipping conditional scope");
tok2 = tok2->next()->link();
if (Token::Match(tok2, "} else {")) {
if (Token::simpleMatch(tok2, "} else {")) {
if (Token::findmatch(tok2, "continue|break|return", tok2->linkAt(2), varid)) {
if (settings->debugwarnings)
bailout(tokenlist, errorLogger, tok2, "For loop variable bailout on conditional continue|break|return");