Daniel Marjamäki
39a69b0871
Fixed #1970 (Internal error. CheckClass::SpaceInfo::getVarList found variable '_root' with varid 0.)
2010-08-23 21:22:11 +02:00
Daniel Marjamäki
f7063bed7c
Fixed #1967 (Tokenizer::setVarid doesn't set variable value (list of function pointers))
2010-08-23 20:15:02 +02:00
Daniel Marjamäki
3b716dfcc9
Tokenizer: Simplified the bitfields handling. This patch just looks for the bitfield signature but doesn't care about the type. I don't think any other code would have this same signature so it should be OK. We could add code to only look in structures and classes but I don't think that is necessary. Ticket: #1956
2010-08-23 07:29:05 +02:00
Robert Reif
807269b5e9
Refactoring handling of microsoft types. Ticket: #1956
2010-08-22 21:53:45 +02:00
Robert Reif
cb7b508f77
Tokenizer::simplifyBitfields: fixed more issues. Ticket #1956
2010-08-22 13:25:47 +02:00
Robert Reif
3fcca23b53
Tokenizer: better handling of bitfields. Ticket: #1956
2010-08-22 09:41:22 +02:00
Robert Reif
77d634127c
Tokenizer: simplify DECLARE_DYNAMIC and DECLARE_DYNCREATE
2010-08-22 09:38:05 +02:00
Robert Reif
ac9078857e
Tokenizer: simplify bitfields. Ticket: #1956
2010-08-21 16:34:41 +02:00
Robert Reif
9c594684db
Tokenizer: handle DECLARE_DYNAMIC. Ticket: #1956
2010-08-21 07:55:14 +02:00
Robert Reif
7173e01926
Fixed #1965 (tokenizer::simplifyEnum add support for C++0x enums)
2010-08-21 07:44:56 +02:00
Daniel Marjamäki
741ce40e3d
Tokenizer::setVarId : fixed problem for class members
2010-08-20 19:28:10 +02:00
Robert Reif
f123e951ec
Fixed #1963 (typedef array incorrectly simplified)
2010-08-20 07:11:02 +02:00
Daniel Marjamäki
cfa7b4906e
Symbol database: bug fixes. Ticket: #1895
2010-08-18 22:42:04 +02:00
Daniel Marjamäki
0934035fcf
Fixed #1955 (cppcheck hangs with 100% cpu load)
2010-08-18 22:22:14 +02:00
Daniel Marjamäki
1fd773b245
Fixed #1944 (segfault in Tokenizer::simplifyLogicalOperator)
2010-08-17 20:06:20 +02:00
Daniel Marjamäki
aa00587fed
#1943 (segmentation fault of cppcheck (= default))
2010-08-17 19:50:21 +02:00
Daniel Marjamäki
64cdee62ef
Fixed #1942 (false positive: uninitialized variable in __asm__ statement)
2010-08-16 19:38:47 +02:00
Daniel Marjamäki
85acb005a2
Fixed #1941 (Internal error::Space Info::getVarList found variable with varid 0)
2010-08-16 18:51:25 +02:00
Daniel Marjamäki
fe482785aa
Variable Id: Fixed various bugs related to templates and bitfields. Ticket: #1928
2010-08-15 11:54:28 +02:00
Daniel Marjamäki
4949869f5f
removed unused variable 'dot'
2010-08-15 09:03:16 +02:00
Daniel Marjamäki
4ff9a1ac94
Fixed #1928 (missing varId for template class variable)
2010-08-14 20:50:49 +02:00
Daniel Marjamäki
cb72f21994
Optimisation in Tokenizer::tokenize
2010-08-11 17:29:33 +02:00
Daniel Marjamäki
0ea9e98680
Optimisation: Made inner loop in Tokenizer::setVarId faster
2010-08-10 19:06:45 +02:00
Daniel Marjamäki
a1f288d088
Tokenizer::setVarId : Fixed a problem when using static class members
2010-08-10 18:22:58 +02:00
Daniel Marjamäki
6a3befa720
Optimising: Tokenizer::setVarId when setting variable ids for struct/class members
2010-08-08 19:14:23 +02:00
Daniel Marjamäki
5a8181d425
Tokenizer: 'simplifyCalculations();' should have the same results as 'while (simplifyCalculations());'
2010-08-08 09:25:09 +02:00
Daniel Marjamäki
1555901077
Refactoring: Made Tokenizer::simplifyCalculations a little faster
2010-08-08 08:28:28 +02:00
Daniel Marjamäki
7911626aed
gcc: fixed some more -Wsign-conversion warnings
2010-08-06 22:43:06 +02:00
Daniel Marjamäki
12217461a2
gcc: fixed some more -Wsign-conversion warnings
2010-08-06 22:37:48 +02:00
Daniel Marjamäki
146465a6ad
gcc: Fixed some compiler warnings when using -Wsign-conversion. Ticket: #1487
2010-08-06 18:42:55 +02:00
Daniel Marjamäki
7fb44d1995
gcc: fixed some compiler warnings when using -Wsign-conversion
2010-08-06 18:32:31 +02:00
Daniel Marjamäki
6346e1aa90
Borland C++: Fixed compiler errors
2010-08-06 17:44:26 +02:00
Daniel Marjamäki
9edecd4a3f
Added ErrorLogger::reportProgress and removed ErrorLogger::ReportProgress. This will make it easier for GUI and other clients to display progress information.
2010-08-03 16:36:21 +02:00
Daniel Marjamäki
2e2baa23a6
Fixed #1909 (### Internal error in Cppcheck. Please report it)
2010-07-28 21:03:15 +02:00
Daniel Marjamäki
2fd2ab1712
Fixed a vs compiler warning. Ticket: #1901
2010-07-27 17:48:22 +02:00
Daniel Marjamäki
bb7484945a
Fixed #1887 (internal error in GLee)
2010-07-25 18:20:30 +02:00
Daniel Marjamäki
e358af9018
Refactoring: Report progress when checking takes a long time. Ticket: #1868
2010-07-25 18:19:37 +02:00
Daniel Marjamäki
0c65796984
Refactoring: Cleanup headers using checkheaders
2010-07-24 22:12:56 +02:00
Daniel Marjamäki
b8146271a2
Report progress when checking a file takes a long time. Ticket: #1868
2010-07-24 18:58:52 +02:00
Daniel Marjamäki
9b49202da8
Refactoring Tokenizer::syntaxError
2010-07-24 10:39:01 +02:00
Daniel Marjamäki
dd07d82c34
Refactoring MathLib: Report errors through the tokenizer. Ticket: #1839
2010-07-24 10:25:03 +02:00
Daniel Marjamäki
84e576de04
Refactoring: use MathLib add/sub instead of calculate
2010-07-24 10:13:45 +02:00
Daniel Marjamäki
8a0d989190
Refactoring: Don't throw exceptions in the tokenizer upon errors. Ticket: #1866
2010-07-23 14:02:29 +02:00
Daniel Marjamäki
e1612bc175
Fixed #1891 (Internal error when enum assigned to sizeof without brackets)
2010-07-22 22:21:12 +02:00
Daniel Marjamäki
f69109fbf6
Fixed #1828 (### Internal error in Cppcheck. Please report it.)
2010-07-22 19:57:48 +02:00
Daniel Marjamäki
3c376047ba
pulled changes from kimmov (filelocation-refactor)
2010-07-19 18:06:49 +02:00
Daniel Marjamäki
d4d0bc050a
Fixed #1865 (Tokenizer::simplifyRedundantParantheses: wrong handling of 'operator delete')
2010-07-19 12:06:20 +02:00
Daniel Marjamäki
e7690836fd
fixed the mistake I made when applying patch
2010-07-18 20:56:19 +02:00
Robert Reif
689de10abf
uninitialized class members: better handling of nested classes
2010-07-18 20:43:51 +02:00
Daniel Marjamäki
020a8a965c
use cppcheckError to report Tokenizer/Preprocessor error instead of std::cerr
2010-07-18 12:57:29 +02:00
Daniel Marjamäki
a4b887f21a
Fixed #1843 (Tokenizer::createTokens() calls std::exit(0))
2010-07-18 12:44:55 +02:00
Kimmo Varis
6db365e6f7
Improve path name handling in ErrorLogger.
...
This commit adds setfile() method to FileLocation class. The setfile
method converts in Windows path separators to internally used Unix
separators. And getfile() converts path separators back to Windows
separators. This fixes bugs that error reports had mixed path
separators in paths.
2010-07-17 01:27:40 +03:00
Kimmo Varis
ad0394939a
Refactor ErrorMessage constructor to take Severity::SeverityType.
...
This removes lots of unneeded casting as everybody now uses the
Severity::SeverityType.
2010-07-14 23:11:32 +03:00
Robert Reif
c572e6af87
Fixed #1846 (False positive with -s: Variable hides typedef with same name)
2010-07-13 08:08:12 +02:00
Daniel Marjamäki
61150498c4
Variable Id: fixed issue with function call. Ticket: #1848
2010-07-12 20:18:03 +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
Robert Reif
b0f1d5669b
Fixed #1829 (### Internal error in Cppcheck. Please report it.)
2010-07-07 07:40:11 +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
b173d5f117
Fixed #1817 (False positive: Resource leak (casting))
2010-07-05 13:16:33 +02:00
Robert Reif
28c265b20c
Fixed #1821 (simplifyTypedef: better typedef support)
2010-07-02 15:22:29 +02:00
Robert Reif
b33fb48618
Fixed #1816 (Tokenizer: remove restrict keyword)
2010-06-30 08:10:39 +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
Robert Reif
38f90dae09
Fixed #1813 (false negative: Member variable not assigned a value in operator=)
2010-06-25 07:52:12 +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
Daniel Marjamäki
26e167fd5b
Refactoring: Removed redundant checks
2010-06-20 20:51:36 +02: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
Robert Reif
ec61c6fa26
Fixed #1801 (simplifyTypedef: duplicate typedefs not handled properly)
2010-06-18 07:16:05 +02:00
Robert Reif
f116e74f6e
Fixed #1801 (Segmentation fault while scanning Qt's qcups.cpp)
2010-06-17 06:59:01 +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
61e7e759f0
Fixed #1798 (structure templates)
2010-06-16 07:13:52 +02:00
Daniel Marjamäki
a42273da63
Fixed #887 (Tokenizer: Simplify variable value after loop)
2010-06-15 17:56:14 +02: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
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
f3fbdc96e1
Fixed #1788 (Tokenizer: template destructor is lost)
2010-06-12 08:32:05 +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
4c4844b722
Fixed #1723 (Variable assigned value which is never used but is thrown)
2010-06-03 07:05:57 +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
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
d09e1df0d7
Fixed #1714 (Wrong precedence for shift operators when simplifying calculations?)
2010-05-29 20:27:08 +02:00
Robert Reif
1a25183e8f
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-29 07:52:06 +02: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
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
019e1f9dfe
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-25 20:43:44 +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
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
Daniel Marjamäki
8d2e4bc553
Tokenizer: give dead pointer a value
2010-05-21 08:26:53 +02:00
Daniel Marjamäki
f87eb774eb
Fixed #1646 (False positive: array access after return cannot have default loop value)
2010-05-18 19:55:23 +02:00
Robert Reif
41c43c1790
Fixed #1691 (False positive: Function parameter 'x' is passed by value. It could be passed by reference instead.)
2010-05-18 18:20:11 +02:00
Zachary Blair
1539c0b3d2
Fixed #1649 (add a warning for potential memory leaks when using realloc)
2010-05-17 22:46:48 -07:00
Robert Reif
0d7474042a
Fixed #1685 (segmentation fault of cppcheck)
2010-05-18 07:11:23 +02:00
Robert Reif
9dfbd3946a
Fixed #1673 (Tokenizer::simplifyTypedef causes segfault for boost library)
2010-05-17 19:58:27 +02:00
Daniel Marjamäki
453adb4ea4
Tokenizer: it is bad to do: 'tok->previous()->deleteThis()'
2010-05-17 19:50:36 +02:00
Daniel Marjamäki
56d176e1ce
Fixed #1684 (false positive: buffer access out of bounds when using extern variable declaration)
2010-05-16 20:21:22 +02:00
Erik Lax
19aaa32a99
Fixed #1688 (Tokenizer::simplifyKnownVariables and pointer assignments)
2010-05-16 19:38:44 +02:00
Daniel Marjamki
8b1ffefd74
Fixed #1682 (Internal error)
2010-05-14 18:40:15 +02:00
Robert Reif
f8cceface5
Fixed #1677 (False positive: (style) Variable 'xxx' is assigned a value that is never used)
2010-05-13 13:59:41 +02:00
Robert Reif
963108d957
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-11 21:41:33 +02:00
Robert Reif
a390f3c8f4
Better handling of function pointer typedef
2010-05-10 17:50:40 +02:00
Robert Reif
ac7515cdcc
Fixed #1666 (simplifyTypedef: add support for typedefs of functions)
2010-05-10 07:12:06 +02:00
Daniel Marjamäki
d19dd2c61d
Fixed #1654 (False positive: Memory leak with: ( delete ( p ) , ( p ) = 0 );)
2010-05-07 18:37:50 +02:00
Daniel Marjamäki
c8c5f95721
Fixed #1651 (Tokenizer::setVarId wrong handling of return statement)
2010-05-06 18:40:52 +02:00
Daniel Marjamäki
af4c4cef34
Fixed #1646 (False positive: array access after return cannot have default loop value)
2010-05-05 18:29:56 +02:00
Daniel Marjamäki
612be2557b
Fixed #1646 (False positive: array access after return cannot have default loop value)
2010-05-04 20:02:47 +02:00
Daniel Marjamäki
804b2a0952
Fixed #1642 (Tokenizer::simplifyKnownVariables: simplify after loop)
2010-05-02 14:41:21 +02:00
Slava Semushin
f50d182750
Fixed #1574 (chain assignments could be simplified)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1574
2010-05-01 15:28:35 +07:00
Daniel Marjamäki
080374dc04
Fixed #1638 (Tokenizer::simplifyKnownVariables: removing variable declaration)
2010-05-01 10:09:53 +02:00
Eric Sesterhenn
b261e5df25
Fixed #1634 (Null character not correctly tokenized)
2010-04-29 18:30:23 +02:00
Robert Reif
c79b9a8aac
Fixed #1631 (Tokenizer: remove register keyword)
2010-04-29 07:17:38 +02:00
Daniel Marjamäki
6bb93b5eb7
Fixed #943 (Tokenizer: improve handling of pointer aliasing)
2010-04-25 15:12:47 +02:00
Daniel Marjamäki
8ccd95a643
Fixed #836 (buffer overrun: memmove)
2010-04-24 21:48:58 +02:00
Robert Reif
99a7755218
tokenizer improvements: remove calling convention ( #1619 )
2010-04-24 09:40:05 +02:00
Zachary Blair
5835b2665b
Fixed #1169 (improve check: divsion by zero not detected when using the shift (>>) operator)
2010-04-23 22:59:53 -07:00
Robert Reif
f4ce5a37d7
Fixed #1615 (False positive - C-style pointer casting)
2010-04-22 20:08:29 +02:00
Robert Reif
90541386da
Fixed #1619 (tokenizer: remove calling convention)
2010-04-21 21:08:47 +02:00
Robert Reif
bee4608b27
Fixed #1613 (False -s positive: Template instantiation hides typedef with same name)
2010-04-18 09:13:55 +02:00
Robert Reif
d90f59051c
Fixed #1612 (false positive: The function can be const)
2010-04-18 07:53:39 +02:00
Daniel Marjamäki
c718a7c595
astyle: Update to astyle 1.24
2010-04-15 20:08:51 +02:00
Daniel Marjamäki
3fa2137ee3
Fixed #1596 ('Index out of bounds' false positive)
2010-04-15 19:09:19 +02:00
Robert Reif
176795ef95
Another fix for #1601 (change simplifyInitVar to split declaration from initialization)
2010-04-15 18:42:11 +02:00
Robert Reif
d2bb4964d0
Fixed #1588 (typedef struct incorrectly simplified)
2010-04-14 19:06:51 +02:00
Robert Reif
3bbb2e1d7f
Fixed #1601 (change simplifyInitVar to split declaration from initialization)
2010-04-14 19:04:16 +02:00
Reijo Tomperi
0912836c25
Fix: sizeof(char*) was not simplified correctly
2010-04-13 23:17:27 +03:00
Reijo Tomperi
4a33b226e6
Fix #1599 (false positive on if( (f = fopen("foo", "r")) == ((FILE*)NULL) ))
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1599
2010-04-13 22:57:52 +03:00
Reijo Tomperi
35d2a27b9c
Update copyright year in all source files
2010-04-13 22:23:17 +03:00
Daniel Marjamäki
a7903c3385
dos2unix
2010-04-13 19:25:08 +02:00
firewave
8966888a92
Fixed some VS2008 warnings
2010-04-13 11:31:27 +02:00
Daniel Marjamäki
38a3fe37f9
Revert "Optimization: Made Tokenizer::setVarId a bit faster by temporarily assigning 'string id'. This means less string comparisons are needed."
...
This reverts commit 4b8080e425
.
2010-04-12 21:17:31 +02:00
Robert Reif
67fafd4028
Fixed #1588 (typedef struct incorrectly simplified)
2010-04-12 19:05:31 +02:00
Daniel Marjamäki
4b8080e425
Optimization: Made Tokenizer::setVarId a bit faster by temporarily assigning 'string id'. This means less string comparisons are needed.
2010-04-11 21:37:35 +02:00
Reijo Tomperi
d1f22d50e6
Fix last of the -Wshadow warnings.
2010-04-11 14:49:50 +03:00
Zachary Blair
3152816619
Fixed #779 (Tokenizer: delete register keyword everywhere)
2010-04-10 09:58:09 +02:00
Robert Reif
bc0a318b6d
Fixed #1580 (unnamed anonymous struct can segfault)
2010-04-08 17:40:23 +02:00
Reijo Tomperi
6db663f6de
Fix #1322 (Add cppcheckError and unusedFunction to --errorlist, give out internal errors in xml)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1322
2010-04-04 23:55:28 +03:00
Daniel Marjamäki
849be383e6
Tokenizer: tokenize 1E-2 into a single token
2010-04-04 08:01:05 +02:00
Daniel Marjamäki
a4144b9d18
Refactoring: Moved copy/paste code in Tokenizer
2010-04-03 09:54:10 +02:00
Daniel Marjamäki
ff38bbf468
Cleanup: The Tokenizer doesn't need to handle UTF in code nor multiline string. That is handled in the Preprocessor.
2010-04-02 20:48:32 +02:00
Daniel Marjamäki
c6bbc9d739
Fixed #1565 (False positive: Uninitialized variable 'B::j'. There are 2 classes with the name 'B')
2010-04-02 19:29:54 +02:00