Robert Reif
e86e8449f8
Variable usage: better handling of pointer aliasing. Ticket: #1729
2010-07-12 09:50:18 +02:00
Kimmo Varis
c9215e9e44
Change the "information" error to "debug" error.
...
There was one debugging error sent with "information" severity. That
confused the GUI that didn't know such severity. Change the severity
to "debug" so the meaning of the error is more clear.
2010-07-12 00:56:52 +03:00
Daniel Marjamäki
94a8eba989
1.44: updated version information
2010-07-10 11:29:07 +02:00
Daniel Marjamäki
4b0e3edfa4
Unit Testing: Test that suppressions work
2010-07-09 13:27:15 +02:00
Daniel Marjamäki
abbd557761
Fixed #1836 (--suppresions file.txt fails due to wrong line edings)
2010-07-09 12:42:08 +02:00
Daniel Marjamäki
2531bb73d7
Fixed #1834 (False positive: invalid iterator when erase() is used in if-else)
2010-07-09 10:50:24 +02:00
Daniel Marjamäki
a60047227d
Settings: added '#include <cctype>'
2010-07-09 10:18:35 +02:00
Daniel Marjamäki
c34c3ee742
Unused functions: Refactoring
2010-07-08 13:01:53 +02:00
Daniel Marjamäki
1876cd482b
Suppressions: Validate given id
2010-07-08 12:06:27 +02:00
Daniel Marjamäki
11a72461f3
Fixed #1835 (false positive: uninitialized variable when using ?)
2010-07-08 11:16:49 +02:00
Robert Reif
566b4b4beb
Variable usage: fixed false positive reported in #1729
2010-07-08 08:42:34 +02:00
Robert Reif
2d6dfa57e1
Variable usage: Better aliasing support (Ticket #1729 )
2010-07-08 08:00:50 +02:00
Daniel Marjamäki
49626e427e
Realloc: changed the error message. I think it's better to mention realloc in the message.
2010-07-07 20:28:15 +02:00
Daniel Marjamäki
a1793edabe
Fixed #1825 (*log(0) error)
2010-07-07 09:03:40 +02:00
Daniel Marjamäki
4ebf4caf66
Variable usage: only warn about variables that have variable id > 0
2010-07-07 08:50:34 +02:00
Daniel Marjamäki
2bb07a55bd
Fixed #1803 (False positive: unused variable: this)
2010-07-07 08:39:18 +02:00
Daniel Marjamäki
a107cd1b59
Fixed #1729 (False positive: variable is assigned a value that is never used (pointer aliasing))
2010-07-07 08:26:24 +02:00
Robert Reif
b0f1d5669b
Fixed #1829 (### Internal error in Cppcheck. Please report it.)
2010-07-07 07:40:11 +02:00
Daniel Marjamäki
dc2a0a6468
Fixed #1789 (false positive: memory leak (reallocation in subfunction through parameter))
2010-07-06 21:36:50 +02:00
Daniel Marjamäki
1b20f8d27d
Fixed #1824 (false positive: unitialised variable)
2010-07-06 13:18:28 +02:00
Robert Reif
1799e4a575
Fixed #1827 (### Internal error in Cppcheck. Please report it.)
2010-07-06 08:26:30 +02:00
Robert Reif
c949a29d1e
Fixed #1821 (simplifyTypedef: better typedef support)
2010-07-05 23:03:54 +02:00
Daniel Marjamäki
18a75edd20
Fixed #1823 (tokenize && wrong)
2010-07-05 22:41:02 +02:00
Daniel Marjamäki
b02fc037ed
Buffer Overrun: Fixed false positive when variable is reassigned in called function
2010-07-05 22:19:27 +02:00
Daniel Marjamäki
ae3557fa92
Fixed #1820 (False positive: memory leak (auto deallocated class))
2010-07-05 14:01:25 +02:00
Daniel Marjamäki
b173d5f117
Fixed #1817 (False positive: Resource leak (casting))
2010-07-05 13:16:33 +02:00
Daniel Marjamäki
c811acaa50
Fixed #1818 (False positive: Dangerous usage of strncpy (copying a constant string))
2010-07-05 12:45:39 +02:00
Robert Reif
28c265b20c
Fixed #1821 (simplifyTypedef: better typedef support)
2010-07-02 15:22:29 +02:00
Daniel Marjamäki
3205775eb9
Fixed #1790 (mismatching allocation/deallocation false positive)
2010-06-30 09:21:15 +02:00
Zachary Blair
5ea28ccbba
Fixed #157 (Forgetting to put a break in a switch statement)
2010-06-30 00:10:30 -07:00
Daniel Marjamäki
c6888845a0
Fixed #1815 (False positive: uninitialized variable when using ? operator)
2010-06-30 08:28:34 +02:00
Robert Reif
b33fb48618
Fixed #1816 (Tokenizer: remove restrict keyword)
2010-06-30 08:10:39 +02:00
Daniel Marjamäki
76133e0234
Class checking: Fixed FP for static arrays (not initialized in constructor)
2010-06-29 12:51:18 +02:00
Robert Reif
4668359b51
Fixed #1808 (false positive: uninitialized variable with multiple assignment)
2010-06-29 08:38:24 +02:00
Daniel Marjamäki
46e2f1e64b
--author=Robert Reif <reif@earthlink.net>
...
Fixed #1814 (false positive: Variable hides typedef with same name)
2010-06-28 15:33:27 +02:00
Daniel Marjamäki
f82895c1f2
Fixed #1809 (false positive: uninitialized variable with nested if)
2010-06-26 17:15:44 +02:00
Robert Reif
539804369a
Fixed #1811 (false positive: Uninitialized variable)
2010-06-26 07:50:53 +02:00
Daniel Marjamäki
ad0908cb3f
Fixed #1808 (false positive: uninitialized variable with multiple assignment)
2010-06-25 19:39:30 +02:00
Robert Reif
38f90dae09
Fixed #1813 (false negative: Member variable not assigned a value in operator=)
2010-06-25 07:52:12 +02:00
Daniel Marjamäki
9fd89d3bdc
Fixed #1495 (False -s positive: Member variable not assigned a value in operator=)
2010-06-24 20:09:26 +02:00
Robert Reif
2a1edff77f
Fixed #1812 (false negative: functionVariableUsage doesn't support static variables)
2010-06-24 17:00:32 +02:00
firewave
6fd4ba6e4f
Avoid Visual Studio warnings about constant expressions
2010-06-24 04:24:25 +02:00
Robert Reif
74e48d4bb1
Fixed #1732 (False positive: Variable not assigned a value (pointer to pointer))
2010-06-23 06:54:14 +02:00
Robert Reif
fac9f66cc0
Fixed #1810 (False positive: Variable 'separator' is assigned a value that is never used)
2010-06-22 17:07:41 +02:00
Robert Reif
a5b45a7f83
Fixed #1807 (false positive: Variable is not assigned a value (casting function parameters))
2010-06-22 17:04:11 +02:00
Daniel Marjamäki
d22da6088c
Fixed #1800 (false positive: memory leak when ptr used as map key)
2010-06-21 18:43:28 +02:00
Robert Reif
bdd28b47aa
Fixed #1799 (false positive: Variable is assigned a value that is never used)
2010-06-21 18:12:01 +02:00
Daniel Marjamäki
26e167fd5b
Refactoring: Removed redundant checks
2010-06-20 20:51:36 +02:00
Daniel Marjamäki
4cd3e8fdc0
Refactoring: Reduced copy/pasted code
2010-06-20 19:03:59 +02:00
Daniel Marjamäki
54b8e79cae
Preprocessor: Reduce copy/pasted code
2010-06-20 18:41:45 +02:00
Nicolás Alvarez
c76a9525c1
Change size-t to std::string::size_type.
2010-06-19 17:24:10 -03:00
Nicolás Alvarez
12d6947334
Fix build error on 64-bit systems.
2010-06-19 17:16:14 -03:00
Nicolás Alvarez
df3d98a7c2
Fix typos in sizeofsizeof error message.
2010-06-19 17:16:14 -03:00
Daniel Marjamäki
85bf4b2be6
Fixed #1795 (false positive: nullpointer dereference (needs to improve Tokenizer::simplifyKnownVariables))
2010-06-19 17:54:38 +02:00
Daniel Marjamäki
82b63dd736
Fixed #1633 (tokenizer: simplifyKnownVariable: improved handling of arithmetic)
2010-06-19 14:00:45 +02:00
Daniel Marjamäki
a402b6bb98
Fixed #1802 (Preprocessor: macros are expanded wrong)
2010-06-19 12:03:39 +02:00
Daniel Marjamäki
38c3de7343
Preprocessor: Refactoring. Broke out code that parses out the parameters from code.
2010-06-19 09:09:47 +02:00
Daniel Marjamäki
dcdbe117e6
Borland C++: Fixed compiler errors. When using 'a?b:c', Borland requires that b and c are the same type
2010-06-19 08:52:14 +02:00
Robert Reif
ec61c6fa26
Fixed #1801 (simplifyTypedef: duplicate typedefs not handled properly)
2010-06-18 07:16:05 +02:00
firewave
d6d4b99b85
Removed obsolete checkheaders from Visual Studio projects
2010-06-17 15:00:58 +02:00
Robert Reif
f116e74f6e
Fixed #1801 (Segmentation fault while scanning Qt's qcups.cpp)
2010-06-17 06:59:01 +02:00
Leandro Lisboa Penz
58a872e6a0
Fixed #1789 (false positive: memory leak (reallocation in subfunction through parameter))
...
Detecting reallocations in the other function.
2010-06-16 22:29:55 -03:00
Daniel Marjamäki
8a6f4254e0
Fixed #853 (False positive: memory leak for member variable with unknown function)
2010-06-16 19:28:47 +02:00
Robert Reif
ee7ad272d6
variable usage: fix false positives when __attribute__ is used. Ticket: #1792
2010-06-16 18:04:31 +02:00
Robert Reif
7dba21858a
simplify the alias handling in the checking of variable usage. Ticket: #1729
2010-06-16 18:00:21 +02:00
Robert Reif
61e7e759f0
Fixed #1798 (structure templates)
2010-06-16 07:13:52 +02:00
Zachary Blair
ae2a02ad93
Applied review suggestions for Ticket #920
2010-06-15 22:03:38 -07:00
Daniel Marjamäki
dc12a9b3b5
Fixed #1545 (new check: usage of iterator pointing to invalid memory after reserve)
2010-06-15 19:53:09 +02:00
Daniel Marjamäki
a42273da63
Fixed #887 (Tokenizer: Simplify variable value after loop)
2010-06-15 17:56:14 +02:00
Daniel Marjamäki
5c00c1a539
removed the deprecated checkheaders
2010-06-15 16:56:04 +02:00
Zachary Blair
efefceabae
Fixed #920 (new style check: find empty catch blocks)
2010-06-14 23:45:46 -07:00
Robert Reif
98ae660260
Fixed #1792 (false positive: Variable 'test' is assigned a value that is never used)
2010-06-14 15:46:57 +02:00
Daniel Marjamäki
cb7e9fbec1
Fixed #1776 (False Negative: Unitialized array)
2010-06-14 08:36:34 +02:00
Daniel Marjamäki
b5d0955d11
doxygen: fixed error messages given by doxygen
2010-06-14 07:54:41 +02:00
Daniel Marjamäki
e987d2e05b
Memory leaks: more specific bailouts to reduce false negatives
2010-06-13 19:00:11 +02:00
Daniel Marjamäki
5de124280a
Fixed #1783 (false positive: uninitalized variable in constructor/operator=, when calling overloaded functions)
2010-06-13 10:23:59 +02:00
Daniel Marjamäki
70bfa890a8
Fixed #1718 (Tokenizer add close braces to for loop at wrong place when if-else presents inside)
2010-06-13 08:00:46 +02:00
Robert Reif
18bb7488b9
Fixed #1787 (false negative: out of bounds in derived class)
2010-06-13 07:17:50 +02:00
Daniel Marjamäki
76221c0916
Fixed #1510 (false positive '(possible error) Memory leak' when 'a = b = new ...; delete a' (but not b))
2010-06-12 13:37:44 +02:00
Daniel Marjamäki
f3fbdc96e1
Fixed #1788 (Tokenizer: template destructor is lost)
2010-06-12 08:32:05 +02:00
Robert Reif
3d2c28a524
Fixed #1784 (false positive: Variable is not assigned a value)
2010-06-10 07:21:47 +02:00
Robert Reif
6b65b77acf
Fixed #1782 ((error) ### Internal error in Cppcheck. Please report it.)
2010-06-10 07:18:55 +02:00
Daniel Marjamäki
e64ce2e812
Fixed #1781 (false positive: uninitialized variable when using asm statement in macro)
2010-06-09 21:28:15 +02:00
Robert Reif
00dcec47ac
Variable usage: read variable when using syntax '..=*(p);'
2010-06-08 18:26:14 +02:00
Daniel Marjamäki
472bd9dabe
Fixed #1726 (False negative: null pointer dereference in switch block)
2010-06-06 12:15:31 +02:00
Daniel Marjamäki
e140ff6e84
Memory leaks: skipping function call inside allocation
2010-06-06 11:22:59 +02:00
Daniel Marjamäki
a9196e8710
Memory leaks: Added allocation function 'g_strdup_printf'
2010-06-06 11:09:19 +02:00
Daniel Marjamäki
68ad8219ed
Fixed #1722 (Member variable initialized in call to base class constructor)
2010-06-06 08:29:35 +02:00
Martin Ettl
f75ca79849
applied patch from php-coder from ticket 1724; removed TODO_TESTCASES;
2010-06-05 19:49:49 +02:00
Daniel Marjamäki
1de6e94947
Code coverage: Removed unused code
2010-06-05 11:25:47 +02:00
Daniel Marjamäki
07e00d57d9
Fixed #1725 (segfault in ExecutionPath::bailOutVar (probably caused by #1721 fix))
2010-06-05 09:45:35 +02:00
Leandro Lisboa Penz
4ac7da7d51
Fixed #73 (memory leaks not found when calling a function that returns allocated memory through a parameter)
2010-06-04 20:58:50 -03:00
Zachary Blair
2645e96783
Applied review suggestions for Ticket #568
2010-06-03 22:42:54 -07:00
Daniel Marjamäki
b11e23eb08
Fixed #1721 (False negative: uninitialized variable in switch block)
2010-06-03 20:02:58 +02:00
Robert Reif
4c4844b722
Fixed #1723 (Variable assigned value which is never used but is thrown)
2010-06-03 07:05:57 +02:00
Daniel Marjamäki
09e02b9f9f
updated --help output. The --enable is used to enable additional checks.
2010-06-02 21:34:03 +02:00
Daniel Marjamäki
cb43168d81
Fixed #1720 (segmentation fault of cppcheck)
2010-06-02 18:10:32 +02:00
Daniel Marjamäki
5789eb116d
astyle formatting
2010-06-02 18:09:25 +02:00
Daniel Marjamäki
8ead23fc91
CheckOther::nullConstantDereference: Fixed cppcheck warning message - tok may become null
2010-06-02 18:06:37 +02:00
Daniel Marjamäki
28ad69e4b3
Refactoring of CheckOther::nullConstantDereference
2010-06-02 17:53:45 +02:00
Zachary Blair
33b4254d33
Fixed #568 (string functions with command line arguments may overflow buffer)
2010-06-01 22:41:07 -07:00
Daniel Marjamäki
45821b3871
Fixed #1719 (False negative: memory leak (fgets in condition))
2010-05-31 18:20:34 +02:00
Daniel Marjamäki
9b1ed1112b
Memory leaks: Fixed bug in CheckMemoryLeak::functionReturnType
2010-05-30 20:30:08 +02:00
Daniel Marjamäki
08b6e6ee09
Fixed #1717 (False positive: Resource leak with while)
2010-05-30 13:15:15 +02:00
Daniel Marjamäki
83c62eca9c
Tokenizer: simplify loops that continue while errno is EINTR
2010-05-30 12:49:39 +02:00
firewave
62093d764d
Fixed Visual Studio 2010 warning
2010-05-30 10:44:03 +02:00
Daniel Marjamäki
37ae4692bb
Uninitialized variables: fixed false negative when using uninitialized variable inside malloc call
2010-05-30 10:30:51 +02:00
Daniel Marjamäki
1ec49430e3
Uninitialized variables: better handling when uninitialized variables are used in function calls
2010-05-30 09:31:10 +02:00
Daniel Marjamäki
ab41879246
ExecutionPath: Better handling of 'FOREACH (..) {}'
2010-05-30 09:00:18 +02:00
Daniel Marjamäki
f41334e58a
ExecutionPath: better handling of 'FOREACH(..){..}'
2010-05-30 08:26:44 +02:00
Daniel Marjamäki
d3ed1c8960
Refactoring uninitialized variables (checking variable declarations)
2010-05-30 08:02:39 +02:00
Daniel Marjamäki
406cbda563
Uninitialized variables: better handling of struct variables
2010-05-30 07:55:11 +02:00
Daniel Marjamäki
46b5e4e79a
Fixed #1716 (Wrong reporting of leak with close() in a while loop condition)
2010-05-29 22:20:10 +02:00
Daniel Marjamäki
0c6352a826
Memory leaks: small fixes. add checking of 'g_fopen'. don't let 'fclose' calls be interpreted as 'callfunc'
2010-05-29 21:56:18 +02:00
Daniel Marjamäki
495dfde32c
Fixed #1716 (Wrong reporting of leak with close() in a while loop condition)
2010-05-29 21:11:59 +02:00
Daniel Marjamäki
24703418bd
Fixed #1715 (switch with fallthrough and 'return' confuses cppcheck)
2010-05-29 20:55:09 +02:00
Daniel Marjamäki
d09e1df0d7
Fixed #1714 (Wrong precedence for shift operators when simplifying calculations?)
2010-05-29 20:27:08 +02:00
Daniel Marjamäki
b702b8542d
Memory leaks: enabled the leaks checking when members are not deallocated in the destructor. This checking was previously an --all check so there could be false positives.
2010-05-29 19:29:59 +02:00
Daniel Marjamäki
7601089bee
astyle formatting
2010-05-29 11:19:56 +02:00
Daniel Marjamäki
82f030df2c
the virtual destructor error message needs to be restricted. marked the checking as inconclusive for now.
2010-05-29 11:19:28 +02:00
Zachary Blair
fe1fa4022d
Merge branch 'master' of github.com:danmar/cppcheck
2010-05-28 22:53:54 -07:00
Robert Reif
1a25183e8f
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-29 07:52:06 +02:00
Zachary Blair
59086fa599
Fixed #818 (Detect sprintf buffer overrun with struct members)
2010-05-28 22:51:28 -07:00
Robert Reif
3fb0260ef1
Fixed #1713 (remove Microsoft variants of inline)
2010-05-29 07:43:58 +02:00
Robert Reif
26a7d29760
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-28 06:55:54 +02:00
Daniel Marjamäki
d3c20cac81
Fixed #1712 (False negative: dereferencing uninitialized pointer)
2010-05-27 19:00:52 +02:00
Robert Reif
dc34a1b3ff
Fixed #1711 (Wrong typedef name shown when struct declared with __attribute__)
2010-05-27 18:15:42 +02:00
Robert Reif
8881a0c361
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-27 07:00:33 +02:00
Robert Reif
176b41caa5
Fixed #1709 (char buffer that is only accessed with pointers is marker not assigned)
2010-05-26 19:22:35 +02:00
Daniel Marjamäki
d23f63c805
astyle formatting
2010-05-26 19:21:34 +02:00
Daniel Marjamäki
88e9a4ade6
Fixed #1704 (false negative: null pointer dereference)
2010-05-26 19:16:42 +02:00
Zachary Blair
619cfbc56f
Fixed #168 (buffer overflow: not enough room for the null terminator)
2010-05-26 01:56:34 -07:00
Robert Reif
019e1f9dfe
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-25 20:43:44 +02:00
Robert Reif
4306082fcf
Fixed #1708 (False positive for const)
2010-05-25 06:55:49 +02:00
Daniel Marjamäki
5692e7a6f6
Fixed #1707 (false positive: Memory leak)
2010-05-24 19:28:27 +02:00
Daniel Marjamäki
c465d824b7
Removed TODO
2010-05-24 07:32:33 +02:00
Daniel Marjamäki
78255fdfc5
Tokenizer: Removed the Tokenizer::simplifyNamespaces. Ticket: #1700
2010-05-23 13:51:41 +02:00
Robert Reif
b20cf06b66
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-23 10:46:39 +02:00
Robert Reif
048733a15e
false positive: Variable is assigned a value that is never used
2010-05-23 10:41:05 +02:00
Daniel Marjamäki
8f76aea6ed
2 pass checking: broke out Cppcheck::analyseFile. To be used for tests
2010-05-21 21:06:11 +02:00
Daniel Marjamäki
75c9355e9a
Added some multipass checking for the uninitialized variables. It is still experimental. You can activate it with the '--test-2-pass' switch. Some more refactorings are needed to make it truly usable, the main thing is to make it thread safe.
2010-05-21 19:35:18 +02:00
Daniel Marjamäki
4633979ff7
fixed gcc compiler warnings (comparing float values)
2010-05-21 12:28:13 +02:00
Daniel Marjamäki
89ec49508d
Fixed gcc compiler warning
2010-05-21 12:13:05 +02:00
Robert Reif
a8921afcd7
Fixed #1698 (Add define support to GUI)
2010-05-21 09:49:57 +02:00
Daniel Marjamäki
8d2e4bc553
Tokenizer: give dead pointer a value
2010-05-21 08:26:53 +02:00
Robert Reif
78614b8dc1
Fixed #1699 (False positive: The function '...' can be const)
2010-05-20 17:45:10 +02:00
Robert Reif
5dfbb38dc9
#1697 (false positive: The function can be const)
2010-05-20 06:52:59 +02:00
Daniel Marjamäki
c31accc52a
Fixed #1695 (Ticket #1614 is broken using latest from git)
2010-05-19 19:23:09 +02:00
Daniel Marjamäki
6815f4e941
printchecks: better explanation of its purpose. I call it from gdb when I debug ExecutionPaths.
2010-05-18 20:58:11 +02:00
Daniel Marjamäki
1792395654
astyle formatting
2010-05-18 20:08:27 +02:00