Commit Graph

219 Commits

Author SHA1 Message Date
Daniel Marjamäki 4c641ed80c Fixed #1189 (false negative: using uninitialized variable i 'a[i] = 0;') 2010-01-09 22:26:05 +01:00
Daniel Marjamäki 2dd0907146 fixed segmentation fault 2010-01-08 21:54:24 +01:00
Daniel Marjamäki ca74f57fd0 Fixed #1237 (Uninitialized variable false positive for return-value pattern in pan source code.) 2010-01-08 21:24:48 +01:00
Daniel Marjamäki e248f7d3e5 Fixed #1023 (improve check: Unintialized variable not detected when using +=) 2010-01-03 18:49:13 +01:00
Daniel Marjamäki e286896d75 Fixed #1216 (false positive: uninitialized variable when using exit|abort) 2010-01-03 15:35:32 +01:00
Daniel Marjamäki fa535ff3ae Fixed #440 (NULL referencing not detected) 2010-01-03 13:30:20 +01:00
Daniel Marjamäki 1032eb2449 Fixed #1214 (false positive: uninitialized variable 'bool fixed = std::ios_base::fixed;') 2010-01-03 08:03:28 +01:00
Daniel Marjamäki d82079e86f Fixed #1209 (False positive: uninitialized variable c when it is initialized with 'ab(sizeof(xyz), &c)') 2010-01-02 18:16:44 +01:00
Daniel Marjamäki 2e62a3f4c7 Fixed #1202 (false positive: uninitialized variable when using 'do') 2010-01-02 09:08:36 +01:00
Daniel Marjamäki 071b7b463d Fixed #1200 (false positive 'uninitialized variable' when using throw) 2010-01-01 20:12:39 +01:00
Daniel Marjamäki f8bd59f5b5 Fixed #1191 (false positive: uninitialized variable) 2010-01-01 19:43:02 +01:00
Daniel Marjamäki 7ecd333ffa Fixed #1188 (false negative: dereferencing p, which is a null pointer 'int y = 5 + *p') 2009-12-31 20:00:20 +01:00
Daniel Marjamäki 0159287437 Fixed #1183 (False positive: uninitialized variable p 'd = bar(sizeof(*p));') 2009-12-31 09:10:20 +01:00
Daniel Marjamäki 0ee3d7e46a Fixed #1182 (False positive: uninitialized variable 'int *pa = &a;') 2009-12-30 21:42:15 +01:00
Daniel Marjamäki ae3ff7d376 Fixed #1087 (uninitialized data not detected 'char z = *str') 2009-12-30 20:37:11 +01:00
Daniel Marjamäki 461d826eff Fixed #1105 (improve check: uninitialized variable not detected for 'a = a') 2009-12-30 20:15:44 +01:00
Daniel Marjamäki d83131ca92 Fixed #1041 (passing a nullpointer to a reference) 2009-12-30 17:42:41 +01:00
Daniel Marjamäki 06ee643c6a Fixed #1177 (False positive: pointer is not dereferenced 'sizeof(*p)') 2009-12-30 11:32:46 +01:00
Daniel Marjamäki 2a28ca72cc Fixed #1166 (improve check: using uninitialized pointer to create reference 'int &r(*p);') 2009-12-29 20:36:20 +01:00
Daniel Marjamäki 71b328d703 Robert Reif: Fixed #1163 (post increment test broken for complex template types) 2009-12-29 19:24:48 +01:00
Daniel Marjamäki cfdf2b8cfe Fixed #1160 (Null pointer dereference vs. goto) 2009-12-29 09:17:07 +01:00
Daniel Marjamäki 9aca2e7680 Fixed #1156 ([False positive] Uninitialized variable - class member in constructor) 2009-12-28 12:51:28 +01:00
Daniel Marjamäki b1e963fe2c Fixed another issue with #1154 (false positive: Data is allocated but not initialized) 2009-12-27 18:00:43 +01:00
Daniel Marjamäki 1c0f3ee179 Fixed #1154 (false positive: Data is allocated but not initialized) 2009-12-27 17:35:18 +01:00
Daniel Marjamäki 738987a686 Fixed #1138 (improve check: dereferencing uninitialized pointer) 2009-12-27 17:20:34 +01:00
Daniel Marjamäki fbfe5a4bd1 Fixed #1153 (False positive: uninitialized data for reinterpret_cast) 2009-12-27 09:27:05 +01:00
Daniel Marjamäki ab7ffd2391 Uninitialized variables: Fixed false positive for 'if (ptr)' 2009-12-26 16:22:14 +01:00
Daniel Marjamäki a82a085d10 Fixed #1151 (false positive: Data is allocated but not initialized) 2009-12-26 09:30:02 +01:00
Daniel Marjamäki 9819b75e17 ExecutionPath: Refactoring if-handling 2009-12-25 20:50:23 +01:00
Daniel Marjamäki b5291825ce Fixed #683 (wrong usage of strcmp) 2009-12-25 19:45:21 +01:00
Daniel Marjamäki 9b05850e97 fixed unit testing 2009-12-23 20:00:12 +01:00
Daniel Marjamäki ea51c3e098 Refactoring the uninitialized variable / null pointer checks so they use a common function to inspect function calls 2009-12-23 19:51:32 +01:00
Daniel Marjamäki a7d48f2eb4 Fixed #1147 (Improve check: return uninitialized variable) 2009-12-23 17:55:03 +01:00
Daniel Marjamäki b6c320de8a Fixed false positives about uninitialized variables 2009-12-23 15:01:23 +01:00
Daniel Marjamäki ef21ba7425 Fixed #1137 (false positive: uninitialized variable when using a class object) 2009-12-23 13:57:01 +01:00
Daniel Marjamäki 5a89cc3259 Robert Reif: Fixed #1139 (false negative: CheckOther::postIncrement() only finds at most one problem) 2009-12-23 13:38:54 +01:00
Daniel Marjamäki 2bd60ab6c8 Fixed #1133 (Uninitialized array: strchr, strrchr, etc) 2009-12-22 21:08:29 +01:00
Daniel Marjamäki 566cfce8da Fixed #1128 (false positive: Data is allocated but not initialized) 2009-12-22 21:00:52 +01:00
Daniel Marjamäki aaf908bd5e astyle formatting 2009-12-22 19:18:02 +01:00
Daniel Marjamäki 11da89784f Eric Sesterhenn: Fixed #1130 (False positive uninitialized variable) 2009-12-22 19:16:34 +01:00
Daniel Marjamäki 2e0566bf7a Fixed #1096 (Non-obvious error message: Overlapping data buffer) 2009-12-21 21:05:55 +01:00
Daniel Marjamäki b3b07321ca ericsesterhenn: Fixed #1091 (improve check: nullpointer dereference not detected) 2009-12-21 19:09:13 +01:00
Daniel Marjamäki d9cf70c1c6 Fixed #1119 (false positve: uninitialized variable y when y is assigned in inner expression 'x = (y = 10)') 2009-12-20 13:55:17 +01:00
Daniel Marjamäki e03ff727d4 Fixed #1103 (false positive: uninitialized variable when using references) 2009-12-15 19:50:48 +01:00
Daniel Marjamäki 9646f62ec1 Fixed #1075 (False positive: uninitialized variable 'return bar(s);') 2009-12-11 19:58:29 +01:00
Daniel Marjamäki 91114c50d2 Fixed #1061 (false positve: uninitialized variable) 2009-12-09 20:05:06 +01:00
Daniel Marjamäki 2d180ab918 newcheck: added the 'newcheck' functionality. It's still in early state so it needs refactoring 2009-12-06 18:41:28 +01:00
Daniel Marjamäki ded2e68c2e Fix #1022 (False positive: uninitialized variable when using local struct) 2009-11-29 19:23:31 +01:00
Daniel Marjamäki a3a3ff4349 fixed testcase so it's valid syntax 2009-11-17 19:06:53 +01:00
Daniel Marjamäki d866c174cf Fixed 2009-11-15 20:26:07 +01:00
Daniel Marjamäki 469a8e4032 Fixed #925 (uninitialized deletion not detected) 2009-11-15 20:01:57 +01:00
Reijo Tomperi 9275b49688 Fix #964 (Integer division by zero exception)
http://sourceforge.net/apps/trac/cppcheck/ticket/964
2009-11-15 17:44:30 +02:00
Daniel Marjamäki 822f64ec9a Fixed #953 (false positive: 'uninitialized variable' with function pointer) 2009-11-15 12:42:04 +01:00
Daniel Marjamäki ebf907cbc0 Fixed #936 (false positive: uninitialized variable '.. else return; .. ') 2009-11-14 20:37:54 +01:00
Daniel Marjamäki ec6d66ff45 Fixed #913 (false positive: uninitialized variable) 2009-11-14 08:00:17 +01:00
Daniel Marjamäki e0b1303b50 Fixed #929 (Uninitialized variable false positive) 2009-11-10 18:05:55 +01:00
Daniel Marjamäki d85fb9dd3d unit testing: minor syntax updates 2009-11-09 20:40:30 +01:00
Daniel Marjamäki 4b04ed9ad9 Fixed #910 (false positive: uninitialized variable for array) 2009-11-08 07:31:01 +01:00
Daniel Marjamäki d88c236efe uninitialized data: minor fix to handle 'new char [' better 2009-11-07 14:54:12 +01:00
Daniel Marjamäki 60caefe069 uninitialized data: added more checking for allocated data 2009-11-07 09:10:15 +01:00
Daniel Marjamäki c561a36cc7 uninitialized variables: better checking of strncpy 2009-11-06 19:06:45 +01:00
Daniel Marjamäki 7397bfc765 Fixed #904 (false positive: uninitialized variable) 2009-11-06 16:50:02 +01:00
Daniel Marjamäki 53f7b12b4f Fixed #902 (false positive: uninitialized variable when variable is initialized in macro) 2009-11-06 16:02:13 +01:00
Daniel Marjamäki 442584151b Fixed #897 (false positive: uninitialized variable when assigning pointer to array to struct member) 2009-11-05 21:07:04 +01:00
Daniel Marjamäki c3dff9a6d3 Fixed #893 (False Positive: Uninitialized variable b in a[0] = b[0] = '\0';) 2009-11-03 21:02:16 +01:00
Daniel Marjamäki 797e9aeaf5 Fixed #890 (false positive: Uninitialized variable when pointer takes the address to array) 2009-11-03 17:03:53 +01:00
Daniel Marjamäki 8d57cef7f9 Fixed #764 (usage of unitialized variable not detected) 2009-11-02 19:58:49 +01:00
Daniel Marjamäki 169bcfcff2 Fixed #882 (false positive: uninitialized variable) 2009-11-02 18:31:22 +01:00
Daniel Marjamäki 4abbe9ffd4 Fixed #889 (false positive: uninitialized variable) 2009-11-02 16:28:15 +01:00
Reijo Tomperi eebbc1b906 Fix #884 (False positive: Possible null pointer reference about a non-pointer)
http://sourceforge.net/apps/trac/cppcheck/ticket/884
2009-11-01 13:08:37 +02:00
Daniel Marjamäki c83d9cd786 Fixed #843 (new check: Passing uninitialized array to strlen/strdup/strcpy/strcat/etc) 2009-10-31 16:36:56 +01:00
Daniel Marjamäki 266291baf4 Fixed #876 (false positive: uninitialized variable) 2009-10-31 10:30:32 +01:00
Daniel Marjamäki 45df223bfb Fixed #875 (Uninitialized variable: initialization in subfunction) 2009-10-30 18:28:01 +01:00
Daniel Marjamäki 7dbf22aa3f null pointer: fixed false positive when condition checks if pointer is ok 2009-10-30 15:14:24 +01:00
Daniel Marjamäki 2cf849a9b8 uninitialized variables: fixed false positive when switch is used 2009-10-30 14:52:20 +01:00
Daniel Marjamäki 765c824c6f Uninitialized pointers: It's allowed to dereference uninitialized non-pointer variables 2009-10-30 14:31:37 +01:00
Daniel Marjamäki 44a9c9b458 Fixed #874 (false positive: uninitialized variable) 2009-10-30 14:06:40 +01:00
Daniel Marjamäki 768225bb1b uninitialized variables: fixed false positives for member variables 2009-10-30 13:43:00 +01:00
Daniel Marjamäki c424d4c8af uninitialized variables: Added TODO testcase for removing false positives 2009-10-29 22:51:08 +01:00
Daniel Marjamäki c6d7fad84f uninitialized variables: added check 2009-10-29 21:34:43 +01:00
Daniel Marjamäki 09859c1019 refactoring the folder structure 2009-10-25 12:49:06 +01:00
Daniel e5f13b4de2 Fixed #839 (False positive: possible null pointer dereference after new) 2009-10-20 20:57:38 +02:00
Daniel Marjamäki 857c95e7b5 Null pointers: Detect code where the assignment is conditional 2009-10-19 17:32:43 +02:00
Reijo Tomperi ad5d87ee14 Fix #802 (possible null pointer dereference reported for reference)
http://sourceforge.net/apps/trac/cppcheck/ticket/802
2009-10-08 11:55:37 +03:00
Reijo Tomperi 014ad937cf Optimize speed and fix one false positive with stl checks. 2009-10-07 23:38:21 +03:00
Reijo Tomperi d9ae2c171e Detect referenced by value errors for std::map also. 2009-10-07 00:04:54 +03:00
Daniel Marjamäki c3d56c1d13 Fix #797 (false positive: variable scope when using function call) 2009-10-06 17:45:28 +02:00
Reijo Tomperi 6901bcae79 Fix #771 (False positive. Null pointer dereference in a switch case)
http://sourceforge.net/apps/trac/cppcheck/ticket/771
2009-10-05 14:46:38 +03:00
Reijo Tomperi 1df8f38423 Fix #793 (Improve passedByValue check)
http://sourceforge.net/apps/trac/cppcheck/ticket/793
2009-10-05 11:59:28 +03:00
Slava Semushin 6b0d364f57 Fixed #782 (Checks are missing test cases)
http://sourceforge.net/apps/trac/cppcheck/ticket/782
2009-10-04 15:05:58 +07:00
Reijo Tomperi f9871c2d54 Fix #745 (false positive: possible null pointer dereference , while)
http://sourceforge.net/apps/trac/cppcheck/ticket/745
2009-09-30 21:42:14 +03:00
Reijo Tomperi 724c78fb4d Fix #750 (cppcheck wants variable outside do-loop to be only inside loop)
http://sourceforge.net/apps/trac/cppcheck/ticket/750
Fix #758 (False positive on variable scope with boost foreach)
http://sourceforge.net/apps/trac/cppcheck/ticket/758
2009-09-30 00:56:43 +03:00
Reijo Tomperi 63523316a2 Check nullpointer check is now executed without --style flag
Added TODO test case for nullpointer check
2009-09-29 16:38:05 +03:00
Reijo Tomperi 64f0f3b308 Fix #751 (if-condition considered redundant even with else-branch)
http://sourceforge.net/apps/trac/cppcheck/ticket/751
Fix also other issue with if(a.b) delete c.b;
Fix also other issue with if(a.b.c) delete a.b.c;
2009-09-29 00:18:40 +03:00
Reijo Tomperi fdde2182b9 Fix GPL comments in all files. ">." was missing from the end. 2009-09-27 18:08:31 +03:00
Reijo Tomperi 16e55f4f89 Improve C style pointer cast detection
http://sourceforge.net/apps/trac/cppcheck/ticket/724
2009-09-24 23:46:08 +03:00
Daniel Marjamäki 7f2ca357b0 Fixed #673 (False positive: null pointer dereference when dynamic cast is used) 2009-09-19 10:54:10 +02:00
Daniel Marjamäki e4291a5966 Fixed #676 (The scope of variable can actually not be limited) 2009-09-17 21:05:12 +02:00
Reijo Tomperi 8ab26e85cf Don't warn about division by zero if zero if floating point number.
Fix bug from mathlib isInt() and add test case from which few are false positives
2009-09-01 22:06:46 +03:00
Reijo Tomperi 0d468d97c7 Fix #630 (Division by zero check only looks at first character of divisor)
http://sourceforge.net/apps/trac/cppcheck/ticket/630
Thanks to liam_routt for finding this and providing fix for it.
2009-09-01 17:00:26 +03:00