Daniel Marjamäki
694325d51f
Fixed #1912 (False positive: memory leak (calling noreturn function))
2010-07-30 08:50:10 +02:00
Daniel Marjamäki
2e2baa23a6
Fixed #1909 (### Internal error in Cppcheck. Please report it)
2010-07-28 21:03:15 +02:00
Ettl Martin
9fa6b20b9d
checkheaders: removed redundant include (token.h) from errorlogger.cpp
2010-07-27 21:40:38 +02:00
Daniel Marjamäki
81d7a37b68
Fixed #1864 (Relative Path of #include-File doesn't work)
2010-07-27 18:07:30 +02:00
Daniel Marjamäki
2fd2ab1712
Fixed a vs compiler warning. Ticket: #1901
2010-07-27 17:48:22 +02:00
Kimmo Varis
45a6742e3f
Windows: Add _CRT_SECURE_NO_WARNINGS define.
...
The _CRT_SECURE_NO_WARNINGS define suppresses some Windows-specific
compile warnings. Windows has "secure" versions of some functions
and compiler outputs warnings that those "secure" versions should
be used instead. Since other platforms don't have those functions
we just suppress this warning for now on.
2010-07-27 17:34:13 +03:00
Daniel Marjamäki
94acebc3d0
Cleanup redundant include
2010-07-27 09:32:20 +02:00
Zachary Blair
9f44d9eb62
Fixed #1889 (false positive: Common realloc mistake)
2010-07-26 23:17:27 -07:00
Daniel Marjamäki
7c5219324e
Refactoring: Cleanup include that checkheaders reported as not needed
2010-07-26 22:05:51 +02:00
Kimmo Varis
17395b310d
Remove unneeded path separator conversion.
2010-07-26 22:49:47 +03:00
Kimmo Varis
2f8d43984f
Fix path separators for couple of messages.
2010-07-26 22:43:49 +03:00
Kimmo Varis
7b8cb17a44
Windows: convert to internal separators when finding files.
2010-07-26 22:16:19 +03:00
Kimmo Varis
60cf37d1ef
Update VS 2010 project files.
2010-07-26 22:06:33 +03:00
Robert Reif
0bb07e6947
Create a symbol database
2010-07-26 16:46:37 +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
786ca037ec
Refactoring: changed 'bool varid=0' to 'bool varid=false'
2010-07-25 18:17:44 +02:00
Daniel Marjamäki
29b2be19ab
Fixed #1383 (Preprocessor: define - ifndef problem)
2010-07-25 15:19:25 +02:00
Daniel Marjamäki
0c65796984
Refactoring: Cleanup headers using checkheaders
2010-07-24 22:12:56 +02:00
Daniel Marjamäki
19e26c3b80
CheckBufferOverrun: report progress. Ticket: #1868
2010-07-24 20:54:42 +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
05c4138b2f
Refactoring: Removed unused variable _xmllist
2010-07-24 18:57:38 +02:00
Daniel Marjamäki
9c17114668
Fixed #1893 (false positive: dereferencing null pointer (try/catch))
2010-07-24 14:27:18 +02:00
Daniel Marjamäki
dfbdd8f9c4
Refactoring Token::Match: Report errors through ErrorLogger. Ticket: #1839
2010-07-24 10:51:17 +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
3ad8f98c61
Refactoring: Settings::addSuppression return error message and callers make sure it's reported properly. Ticket: #1839
2010-07-23 23:12:56 +02:00
Daniel Marjamäki
5c771adece
Refactoring: Use Check::reportError instead of writing to std::cout. Ticket: #1839
2010-07-23 22:53:29 +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
5e0a4a173a
Refactoring: The preprocessor will report errors instead of throwing exceptions. Ticket: #1866
2010-07-23 13:54:52 +02:00
Daniel Marjamäki
37c959023a
Refactoring: The Settings::addEnabled will return error message instead of throwing it. Ticket: #1866
2010-07-23 13:29:16 +02:00
Daniel Marjamäki
1b7796791b
Variable scope: Improved verbose information (see also 7ef0296
)
2010-07-23 12:29:21 +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
Kimmo Varis
b4d55d8e65
Fix path separators for missing include files-message.
2010-07-21 17:00:12 +03:00
Kimmo Varis
9b0851ed25
Fixed #1892 (Verbosity setting set to false and not set back to original value)
...
Verbosity was set to false to temporarily reduce printing messages.
But it was not set back to its original value so rest of the
messages that should have been printed for verbose setting
enabled were not printed.
2010-07-21 16:26:59 +03:00
Kimmo Varis
618076a65f
Better fix for #1371 .
...
Now handles also system includes. And have couple of tests.
2010-07-21 14:16:42 +03:00
Kimmo Varis
9d29ee6edd
Use enum for header file types
2010-07-21 12:58:30 +03:00
Robert Reif
f2f5b3ebf0
Fixed #1883 (false positive: (style) The function 'A::SetPos' can be const)
2010-07-20 09:43:27 +02:00
Kimmo Varis
c25930581c
Formatting and improving comments.
2010-07-19 20:06:42 +03:00
Daniel Marjamäki
3c376047ba
pulled changes from kimmov (filelocation-refactor)
2010-07-19 18:06:49 +02:00
Zachary Blair
df1c911d84
Merge branch 'master' of github.com:danmar/cppcheck
2010-07-19 07:49:44 -07:00
Kimmo Varis
342632a618
Remove './' from begin of paths when printing progress.
2010-07-19 15:05:44 +03:00
Kimmo Varis
dc77bc69a0
Move path simplifying code to Path class.
2010-07-19 14:27:05 +03:00
Robert Reif
4cf92992a8
Fixed #1883 (false positive: (style) The function 'A::SetPos' can be const)
2010-07-19 13:16:11 +02:00
Daniel Marjamäki
d4d0bc050a
Fixed #1865 (Tokenizer::simplifyRedundantParantheses: wrong handling of 'operator delete')
2010-07-19 12:06:20 +02:00
Kimmo Varis
0485976c54
Use std::replace() to replace chars in paths.
2010-07-19 13:02:04 +03:00
Daniel Marjamäki
7ef0296f97
--verbose: added more information for the variableScope error message.
2010-07-19 11:30:01 +02:00
Kimmo Varis
c8d866b906
Merge remote branch 'remotes/kimmo/master'
2010-07-19 11:10:04 +03:00
Kimmo Varis
9f78177914
Remove unused methods from ErrorLogger.
2010-07-19 11:04:30 +03:00
Daniel Marjamäki
bbf2c6c6e6
Fixed #1880 (false positive: Uninitialized array (initialized in subfunction))
2010-07-19 10:03:54 +02:00
Kimmo Varis
95fa267c0e
Remove misleading comment.
2010-07-19 10:54:53 +03:00
Zachary Blair
9ffd06ff5e
Fixed #1856 (false positive: "pData" nulled but not freed upon failure)
2010-07-18 23:55:39 -07:00
Robert Reif
37b37218cf
Fixed #1882 (false negative: function can be declared const)
2010-07-19 08:40:46 +02:00
Robert Reif
7842658cb4
Refactoring CheckClass::initializeVarList. Ticket #1811
2010-07-18 20:58:16 +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
Kimmo Varis
b384aabc52
Fixed #1371 (#include "foo\file.h" -> #include "foo/file.h" should be handled automatically on linux)
...
Linux can't open file paths with / separator. So we'll need to fix
such include file paths (in source files) first.
2010-07-18 20:02:18 +03:00
Daniel Marjamäki
1fb4758583
Fixed #1855 (false positive: uninitialized variable (function call in switch condition))
2010-07-18 13:19:37 +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
Daniel Marjamäki
c16b5d6f3a
Fixed #1857 (XML tag no more included for unusedFunction error (1.44 regression))
2010-07-18 11:22:26 +02:00
Kimmo Varis
006c9f17d4
GUI: Avoid unnecessary path separator conversion.
2010-07-18 11:20:10 +03:00
Robert Reif
81a053aa90
Fixed #1311 (false negative: missing const not found in derived classes)
2010-07-18 10:18:41 +02:00
Kimmo Varis
6903f61f69
Update Visual Studio projects.
2010-07-17 17:59:47 +03:00
Kimmo Varis
5d1a10b0a3
Astyle cleanup.
2010-07-17 17:42:17 +03:00
Kimmo Varis
3c12d23fd9
Add Path class for path handling routines.
...
In this initial commit the Path class contains two methods for
converting path separators. I want to move cppcheck path handling
to direction that we internally have paths with / separator. And
convert from/to native separators when needed.
2010-07-17 17:38:36 +03:00
Robert Reif
9c4bbd4c65
Fixed #1730 (False negative in 'variable not initialized in ctor')
2010-07-17 12:26:05 +02:00
Robert Reif
ad9d1375aa
Fixed #1875 (CheckClass::getVarList: simplify function use)
2010-07-17 12:25:14 +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
6362e50e73
Fix comment.
2010-07-16 22:47:46 +03:00
Kimmo Varis
3fa4e8a1d5
Remove unused ErrorLogger::_writemsg() methods.
2010-07-16 21:40:02 +03:00
Robert Reif
d72365ab00
Fixed #1375 (false negative: uninitialized member variables not found in nested class constructors)
2010-07-15 10:16:16 +02: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
Kimmo Varis
d811970531
Merge remote branch 'remotes/kimmo/severity-refactor'
2010-07-14 22:29:02 +03:00
Kimmo Varis
ba5017cf05
Add debug-severity to Severity::SeverityType.
2010-07-14 21:12:54 +03:00
Kimmo Varis
f54f28530b
Make Severity::none to match and output empty string.
2010-07-14 21:12:54 +03:00
Kimmo Varis
5f8af2e1e8
Refactor ErrorMessage's severity to Severity::SeverityType.
2010-07-14 21:12:39 +03:00
Robert Reif
fd352865ca
CheckClass: Improvements and refactorings for constructors and variables checking
2010-07-14 19:00:52 +02:00
Daniel Marjamäki
a6b6022497
Fixed #1851 (false positive: Member variable not initialized int ctor)
2010-07-14 18:50:29 +02:00
Kimmo Varis
fa0f6edacf
Rename ErrorMessage::toText() to ErrorMessage::toString().
2010-07-14 18:31:05 +03:00
Kimmo Varis
05adb285c5
Rename Severity::stringify() to Severity::toString().
2010-07-14 17:40:18 +03:00
Kimmo Varis
3716b3f9d8
Rename Severity::e to Severity::SeverityType.
2010-07-14 17:30:03 +03:00
Daniel Marjamäki
bea714445a
Fixed #1850 (An access to a nested std::map via a negative integer key is reported as 'Array index out of bounds')
2010-07-14 12:24:07 +02:00
Daniel Marjamäki
233432a888
gcc: fixed compiler warning (suggest parantheses)
2010-07-14 09:46:08 +02:00
Daniel Marjamäki
a1ce80806e
Fixed #1844 (False positive: invalid iterator when erase() is used in if-else (with continue))
2010-07-14 09:42:10 +02:00
Robert Reif
c572e6af87
Fixed #1846 (False positive with -s: Variable hides typedef with same name)
2010-07-13 08:08:12 +02:00
Robert Reif
ab088bcec9
Fixed #1847 (False positive: Method using std::swap<>() can be declared const)
2010-07-13 08:04:48 +02:00
Daniel Marjamäki
61150498c4
Variable Id: fixed issue with function call. Ticket: #1848
2010-07-12 20:18:03 +02:00
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