Commit Graph

3885 Commits

Author SHA1 Message Date
Daniel Marjamäki 974225626d Fixed #3901 (false positive: (error) Uninitialized variable: temp) 2012-06-19 20:07:39 +02:00
Daniel Marjamäki ce5c38f52c Fixed #3890 (False positive Uninitialized variable on returning default value on a class member) 2012-06-19 20:04:10 +02:00
Kimmo Varis fe9e6130cf Add general PRO file for console builds.
It is easier to maintain PRO files when we keep all the console-
build specific general options in one file. For example changes to
compiler options affect to all console builds.
2012-06-18 09:28:32 +03:00
Daniel Marjamäki 2f280332ef Merge pull request #99 from kimmov/tests-generate-pri
Generate a test file listing with dmake.
2012-06-17 10:49:42 -07:00
Daniel Marjamäki a37c3144ed Fixed #3858 (Throw exception in destructor BUT inside a try-catch shouldn't be reported) 2012-06-17 14:33:18 +02:00
Daniel Marjamäki 62f92fe253 Fixed #3866 (false positive: memory leak (UNLIKELY)) 2012-06-17 07:54:24 +02:00
Daniel Marjamäki 2481b80875 Code cleanup. Removed CheckLeakAutoVar::doubleDeallocationError since the same checking is already done by CheckOther::checkDoubleFree 2012-06-17 07:22:15 +02:00
Zachary Blair fa2bca1e09 Ticket #3876: Improved check by only bailing of loops that contain break or continue 2012-06-16 13:11:09 -07:00
Daniel Marjamäki 7d59d86ed6 Fixed #3893 (Improve check: Array index out of bounds not detected when down conting) 2012-06-16 17:44:51 +02:00
Daniel Marjamäki 89b1b4ea6e Fixed #3892 (False positive: 'if (var >= 0.0) then if (var >= 0.0) always returns true 2012-06-15 16:54:02 +02:00
Daniel Marjamäki f967142436 Fixed #3875 (Static member method called with class name is considered unused) 2012-06-14 22:04:21 +02:00
Daniel Marjamäki 5174f7ff5e Fixed #3723 (Preprocessor evaluation order) 2012-06-14 21:47:03 +02:00
PKEuS 8b294a2d4f Disabled C4512 in VS10 (#3882) 2012-06-14 09:39:31 -07:00
Daniel Marjamäki 4b6e1c6946 Fixed #3855 (false positive: (error) Instance of 'locale' object destroyed immediately) 2012-06-13 19:21:20 +02:00
Daniel Marjamäki cc5e06b5d2 Fixed #3861 (uninitialized variables) 2012-06-13 19:09:51 +02:00
August Sodora 90f92250dd Fixed #3618 (segmentation fault of cppcheck) 2012-06-12 21:07:17 +02:00
Daniel Marjamäki 54a66391d8 Fixed #3750 (false positive: C-style pointer casting) 2012-06-12 18:45:31 +02:00
Kimmo Varis d1197315c1 Tests: Add generated testfiles.pri.
Add the generated testfiles.pri file. Previous commits modified
the dmake and test.pro to generate and use the testfiles.pri
containing listing of all source files with tests.
2012-06-11 22:11:29 +03:00
Kimmo Varis 734d4af007 Tests: Generate test file listing with dmake.
Use dmake to generate a test/testfiles.pri with all the files
containing tests. The testfiles.pri is included by the test/test.pro,
which compiles the test runner. This automates the test file listing
instead of former way to hand-edit the file list.

Fixes ticket #3885 (dmake needs to create a list of test files for qmake)
2012-06-11 22:05:55 +03:00
Daniel Marjamäki 08a3d0737e Memory leaks: Write error message when deallocated pointer is returned 2012-06-11 18:28:31 +02:00
PKEuS ef65202a79 Bugfix (#3844): Added 3 missing files to testrunner 2012-06-11 03:55:33 -07:00
Zachary Blair e2348560e4 Fixed Ticket #3876 (Error (double free) detected that can't possibly happen) 2012-06-10 17:50:31 -07:00
seb777 5b763a9f0a Fixed #3579 (object destroyed immediately:False positive & negative) 2012-06-10 21:52:32 +02:00
Ettl Martin c9cb492bc7 #3874 added missing testcase to avoid false positives 2012-06-10 18:36:19 +02:00
Daniel Marjamäki 160fa94a02 Visual Studio: Hide VS compiler warnings for '(char)0xff' and '(char)0xfe' 2012-06-10 15:51:56 +02:00
PKEuS 4b80e91145 Implemented support for building cppcheck lib into a dll
Updated VS9 solution
New VS10 solution that builds cppcheck into a dll used by cli and testrunner.
Functional changes and advantages of new solution:
- Share code between testrunner and cli; ability to share code with gui as well (not yet implemented)
- Files of /lib are no longer compiled twice (should improve build time on single core machines)
- Added configuration for building with PCRE support
- Executables are build into /bin (/bin/debug in debug mode) folder (Should no longer require rebuild when switching between debug and release)
- Completely x64 compatible (contains also x64-debug configuration now)
2012-06-10 05:19:09 -07:00
Daniel Marjamäki 171f570639 Handle UTF-16 files. Partial fix for ticket #2083 2012-06-10 11:00:27 +02:00
Daniel Marjamäki 905615e991 Fixed #3878 (Sign extension with unsigned char false positive) 2012-06-09 08:43:13 +02:00
PKEuS c463d97386 Refactorization:
- Implemented consistent behaviour of Variable::typeStartToken/typeEndToken: Skip const and static on all variables.
- Simplified patterns containing "static|" or "const|" when matching typeStartToken.
2012-06-08 09:05:02 -07:00
Daniel Marjamäki 69846b2a06 Fixed #3872 ('char variables in bit operations' warning) 2012-06-08 17:24:54 +02:00
Daniel Marjamäki c5da030674 Fixed #3869 (References to items in array result it 'Uninitialized variable' errors) 2012-06-08 16:17:55 +02:00
Daniel Marjamäki 2b3e5abef8 Fixed #3865 (Suspicious condition. The result of find is an iterator, but it is not properly checked.) 2012-06-07 19:33:18 +02:00
Daniel Marjamäki 74422e1258 Fixed TODO test case (replaced tabs with spaces in test code) 2012-06-06 13:37:56 +02:00
PKEuS 7c1b0a7602 Issue useInitializationList message only on variables of class types. 2012-06-06 03:03:51 -07:00
Ettl Martin 8a9d1048bf #3370 changed testcase to TODO, because it is not fixed yet. 2012-06-05 09:36:23 +02:00
Daniel Marjamäki 3c103e520b Fixed #3854 (false positive: (style) Variable '_S_c_name' is assigned a value that is never used) 2012-06-05 06:37:55 +02:00
Ettl Martin c42b21c503 added additional tests to ticket #3862 2012-06-04 21:32:11 +02:00
Ettl Martin 1245abe094 added missing testcase for ticket #3370 2012-06-04 21:21:14 +02:00
August Sodora e146591b5d Fixed #3544 (segmentation fault of cppcheck) 2012-06-02 16:15:12 +02:00
Daniel Marjamäki 0cf2c2b327 Fixed #3862 (Double deallocation does not take throws into account) 2012-06-01 19:08:50 +02:00
Daniel Marjamäki a823d29da3 Fixed #3809 (false positive: memory leak) 2012-06-01 19:01:19 +02:00
Daniel Marjamäki d1b4bea304 Fixed #3807 (False positive: possible null pointer dereference) 2012-05-31 18:41:00 +02:00
Ettl Martin d7c1907601 added tests for duplicated branches. Inspired by http://www.viva64.com/en/b/0149/ ( Comparision between PVS-Studio and cppcheck): Errors detected in Quake 3: Arena by PVS-Studio: Fragement 2 2012-05-30 01:30:37 +02:00
Ettl Martin 1620c5b797 added todo testcase for ticket #3809 2012-05-29 21:44:39 +02:00
Daniel Marjamäki 2e41510e30 Fixed #3806 (Possible leak in public function. The pointer '' is not deallocated before it is allocated) 2012-05-29 21:13:34 +02:00
Daniel Marjamäki 8d0f315097 Fixed #3851 (False positive memory leak (condition)) 2012-05-29 21:10:19 +02:00
Ettl Martin da5278f90c Added testcase for ticket #3852 2012-05-29 13:20:51 +02:00
Ettl Martin 474dccf8ad added a testcase for detecting duplicate if else branches. 2012-05-29 09:22:42 +02:00
Zachary Blair 2bd171dded Fixed #3794 (New check: Missing break in switch (duplicate bitwise operation)) 2012-05-28 21:19:22 -07:00
Ettl Martin e584544915 added testcase for ticket #3844 2012-05-28 12:56:24 +02:00