Commit Graph

400 Commits

Author SHA1 Message Date
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