From 557edad77d7df1510f4a42220784d898ad02c54e Mon Sep 17 00:00:00 2001 From: Chuck LeDuc Diaz Date: Wed, 1 Apr 2015 23:01:59 +0200 Subject: [PATCH 1/4] Use cppcheck --- .gitignore | 13 +++++++++++++ Makefile.am | 3 +++ src/cppcheck-suppressions.txt | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 src/cppcheck-suppressions.txt diff --git a/.gitignore b/.gitignore index 674b0c7d..31191bfa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ src/*.exe src/bitcoin src/bitcoind src/test_bitcoin +src/.deps/ +src/.dirstamp .*.swp *.*~* *.bak @@ -56,3 +58,14 @@ qrc_*.cpp build !src/leveldb-*/Makefile + +build-aux/ +libtool +libtorrent/src/.deps/ +libtorrent/src/.dirstamp +libtorrent/src/kademlia/.deps/ +libtorrent/src/kademlia/.dirstamp + +# Targets +twister-control +twisterd diff --git a/Makefile.am b/Makefile.am index 74e097c4..5aae1d49 100644 --- a/Makefile.am +++ b/Makefile.am @@ -201,6 +201,9 @@ clean-local: -$(MAKE) -C src/leveldb clean rm -f src/leveldb/*/*.gcno src/leveldb/helpers/memenv/*.gcno +cppcheck: + cppcheck ./src --force --quiet ./src/cppcheck-supressions.txt + pixmapsdir = $(datadir)/pixmaps pixmaps_DATA = share/pixmaps/* diff --git a/src/cppcheck-suppressions.txt b/src/cppcheck-suppressions.txt new file mode 100644 index 00000000..3b3898e0 --- /dev/null +++ b/src/cppcheck-suppressions.txt @@ -0,0 +1,2 @@ +uninitstring:src/scrypt.cpp:83 +arrayIndexOutOfBounds:src/test/DoS_tests.cpp:300 From f727faeb94d75c7029f177d36ce7a0d40639b1c2 Mon Sep 17 00:00:00 2001 From: Chuck LeDuc Diaz Date: Wed, 1 Apr 2015 23:29:17 +0200 Subject: [PATCH 2/4] fix cppcheck syntax --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 5aae1d49..6f84265c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -202,7 +202,7 @@ clean-local: rm -f src/leveldb/*/*.gcno src/leveldb/helpers/memenv/*.gcno cppcheck: - cppcheck ./src --force --quiet ./src/cppcheck-supressions.txt + cppcheck ./src --force --quiet --suppressions ./src/cppcheck-suppressions.txt pixmapsdir = $(datadir)/pixmaps pixmaps_DATA = share/pixmaps/* From f7c1b660494ed90ac0384c9625102a8e3ff74ddc Mon Sep 17 00:00:00 2001 From: Chuck LeDuc Diaz Date: Wed, 1 Apr 2015 23:41:28 +0200 Subject: [PATCH 3/4] organize .gitignore --- .gitignore | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 31191bfa..20403f3e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,11 @@ src/bitcoind src/test_bitcoin src/.deps/ src/.dirstamp +libtorrent/src/.deps/ +libtorrent/src/.dirstamp +libtorrent/src/kademlia/.deps/ +libtorrent/src/kademlia/.dirstamp +build-aux/ .*.swp *.*~* *.bak @@ -59,13 +64,7 @@ build !src/leveldb-*/Makefile -build-aux/ -libtool -libtorrent/src/.deps/ -libtorrent/src/.dirstamp -libtorrent/src/kademlia/.deps/ -libtorrent/src/kademlia/.dirstamp - # Targets +libtool twister-control twisterd From d9ff2d483fded87b815f230870e95e205042d344 Mon Sep 17 00:00:00 2001 From: Chuck LeDuc Diaz Date: Thu, 2 Apr 2015 00:14:13 +0200 Subject: [PATCH 4/4] multithread cppcheck --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 6f84265c..86f56fba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -202,7 +202,7 @@ clean-local: rm -f src/leveldb/*/*.gcno src/leveldb/helpers/memenv/*.gcno cppcheck: - cppcheck ./src --force --quiet --suppressions ./src/cppcheck-suppressions.txt + cppcheck ./src -j 4 --force --quiet --suppressions ./src/cppcheck-suppressions.txt pixmapsdir = $(datadir)/pixmaps pixmaps_DATA = share/pixmaps/*