Pete Johns
7943d8ce53
canonicalize_file_name() is a GNU-extension.
...
Replaced with call to realpath() to build on non-Linux systems, such as Mac OSX.
2010-12-26 14:15:42 +11:00
Daniel Marjamäki
ecad249ae2
Fixed #2346 (False positive: pointer is assigned value that is never used. used here: 'pCol = pCol->GetNext()')
2010-12-25 19:17:53 +01:00
Daniel Marjamäki
10ee43790d
Fixed #2339 (Tokenizer::setVarId : Wrong handling of 'int gr = id - (TLFPressProperties::OIL_FLUID * nb);')
2010-12-25 12:40:44 +01:00
Daniel Marjamäki
6f8f0e1aa1
Fixed #2353 (Tokenizer::simplifyKnownVariables: wrong simplification after return)
2010-12-25 10:07:57 +01:00
Daniel Marjamäki
81c5576eb4
Misused scope objects: Don't use this check if the checked file is a pure C file. Ticket: #2352
2010-12-25 08:43:52 +01:00
Daniel Marjamäki
65041cf0ff
Fixed #2349 (Empty 'msg' in output when using '-j')
2010-12-24 11:13:57 +01:00
Daniel Marjamäki
335d164cdf
Fixed #2356 (False positive reported with iterator deletion)
2010-12-24 10:33:48 +01:00
Daniel Marjamäki
18fd12006a
Tokenizer::simplifyGoto: Don't simplify 'goto' inside unhandled macro calls. Ticket: #2348
2010-12-23 22:03:58 +01:00
Daniel Marjamäki
472ecd8805
Tokenizer: Fixed calculation simplification of '0*(*p)'. Ticket: #2348
2010-12-23 18:59:18 +01:00
Daniel Marjamäki
aff3623fec
Fixed #2345 (False positive: uninitialized variable (in sub-condition in if inside a loop))
2010-12-23 09:16:29 +01:00
Daniel Marjamäki
b89f486d0d
Fixed #2344 (FileLister Unix: Don't convert to absolute paths)
2010-12-22 21:01:51 +01:00
Daniel Marjamäki
be46d453c4
Information: Added new severity
2010-12-22 19:53:17 +01:00
Daniel Marjamäki
22a1f3332f
xml2: changed the format of the cppcheck-version info
2010-12-22 18:45:09 +01:00
Robert Reif
fc7e2d1ac1
Fixed #2341 (false positive for function pointer returning typedef)
2010-12-22 18:37:23 +01:00
Daniel Marjamäki
00e9822cb3
Fixed #2337 (False Positive: memory leak)
2010-12-22 18:32:00 +01:00
Daniel Marjamäki
3a612d7cd8
xml2: Added cppcheck-version
2010-12-22 10:29:23 +01:00
Daniel Marjamäki
f392dbef95
Fixed #2338 (False positive: Deallocating a deallocated pointer)
2010-12-22 08:24:50 +01:00
Daniel Marjamäki
6951c32683
Fixed #2336 (False positive: memory leak (passing pointer to subfunction))
2010-12-21 21:12:45 +01:00
Daniel Marjamäki
0f9415a5fb
Fixed #2330 (unreadVariable error for a fstream object when only extraction operator (>>) is used)
2010-12-21 19:02:00 +01:00
Robert Reif
244974a61a
unused variables: fixed false negatives with the help of the symbol database. ticket: #2317
2010-12-21 08:13:40 +01:00
Daniel Marjamäki
f73cce9eca
Fixed #2317 ((style) Variable is allocated memory that is never used)
2010-12-20 18:31:16 +01:00
Daniel Marjamäki
cdc8801be0
Fixed #2334 (Internal class index function (no need to 'strchr'))
2010-12-20 18:13:26 +01:00
Daniel Marjamäki
c0bedb5036
Fixed #2331 (Token::Match is called with varid 0)
2010-12-19 21:27:28 +01:00
Daniel Marjamäki
02892499d2
Fixed #2286 (Variable 'ownKilled' is assigned a value that is never used)
2010-12-19 18:27:31 +01:00
Daniel Marjamäki
1cd6f16ecf
Fixed #2322 (cppcheck follows recursive symlinks)
2010-12-19 11:22:27 +01:00
Daniel Marjamäki
8247270f35
Fixed #2328 (false positive: buffer overrun (for loop with a break => the end value is not reached))
2010-12-19 10:39:43 +01:00
Daniel Marjamäki
41ac2c252f
Fixed #2325 (Tokenizer: Remove for-loop if condition is false)
2010-12-18 21:43:12 +01:00
Robert Reif
a2aa601899
CheckOther: Use SymbolDatabase. Ticket: #2318
2010-12-18 20:35:40 +01:00
Kimmo Varis
062eabf246
Don't use relative paths in lib.pri.
...
Using relative path in included file binds it to be usable only
included from one directory. Instead use variable for giving the
base path for files.
2010-12-18 17:03:46 +02:00
Daniel Marjamäki
79ea453913
Preprocessor: Report 'missing system include' with debug severity. temporary solution until the handling of system includes is better.
2010-12-18 14:45:53 +01:00
Daniel Marjamäki
8ffc2b0ac6
Tokenizer: better handling for switch/break in the simplifyKnownVariables. Ticket: #2324
2010-12-18 11:14:31 +01:00
Daniel Marjamäki
f6c00fc478
Fixed #2323 (false positive: Buffer access out of bounds)
2010-12-18 10:54:36 +01:00
Daniel Marjamäki
fc9c450eed
Fixed #2320 (false positive: Uninitialized variable: kbuf)
2010-12-18 10:06:21 +01:00
Daniel Marjamäki
7eb9855104
Tokenizer: Remove redundant parantheses in rhs. Ticket: #2320
2010-12-18 09:44:58 +01:00
Daniel Marjamäki
18933ea0e6
QMake: auto-generate the visual studio project files with qmake
2010-12-17 21:43:47 +01:00
Daniel Marjamäki
814efb2512
Fixed #2313 (False Positive: memory leak)
2010-12-17 21:34:22 +01:00
Daniel Marjamäki
c2335f845e
Fixed #2306 (False positive: array of std::string is reported as uninitialized)
2010-12-17 21:20:04 +01:00
Daniel Marjamäki
696550abd3
Fixed #2299 (false positive: possible nullpointer dereference)
2010-12-17 21:09:12 +01:00
Daniel Marjamäki
845d1491f9
Fixed #2307 (No constructor defined false positive when class is enclosed in namespace)
2010-12-17 20:56:46 +01:00
Daniel Marjamäki
e0a0ed6fac
removed the NOLONGLONG handling. it seems unlikely it is needed
2010-12-16 21:53:18 +01:00
Daniel Marjamäki
0cebcc8fa9
Fixed #2300 (false positive: possible nullpointer dereference)
2010-12-16 21:41:50 +01:00
Daniel Marjamäki
49ee1533d9
Fixed #2301 (false positive: The given size 3 is mismatching)
2010-12-16 21:27:33 +01:00
Daniel Marjamäki
2d97189486
Fixed #2311 (False positive: Index out of bounds)
2010-12-16 20:16:59 +01:00
Robert Reif
f2d69acbfd
Symbol database: reuse in CheckOther. Ticket: #2318
2010-12-16 19:04:47 +01:00
Robert Reif
bf136f0123
Fixed #2314 (False positive: (style) Template instantiation 'Foo' hides typedef with same name)
2010-12-16 07:48:46 +01:00
Kimmo Varis
ac8eb30d68
Fixed #2309 (cppcheck-suppress issue because of path slash/backslash)
...
Internally we are using forward-slash and only convert to backslash
for Windows output. For suppressing we must use internal
forward-slash format of paths.
2010-12-15 22:39:46 +02:00
vBm
46a11183a5
Fixed some spelling mistakes
2010-12-15 18:45:53 +01:00
Daniel Marjamäki
5ce63a1df0
Fixed #2292 (segmentation fault with cppcheck 1.46 with --errorlist)
2010-12-13 18:17:33 +01:00
Daniel Marjamäki
48241c81f8
dmake: add include path '../externals' to lib.pri in case the pcre.h is placed there.
2010-12-12 17:26:13 +01:00
Daniel Marjamäki
2d3865a671
Add support for user defined rules
2010-12-12 11:56:22 +01:00
Daniel Marjamäki
b90e514b32
1.46: updated version information
2010-12-12 08:33:05 +01:00
Daniel Marjamäki
1cfd3309bc
XML2: Added severity 'portability' for future use. Ticket: #2106
2010-12-11 21:54:06 +01:00
Daniel Marjamäki
9de016b96d
Obsolete functions: added better verbose messages
2010-12-09 19:49:33 +01:00
Daniel Marjamäki
69bacde479
Tokenizer: Cleanup redundant statement '; x = x + 0;'. Ticket: #2283
2010-12-09 19:35:52 +01:00
Daniel Marjamäki
ee083cd7a0
Fixed #2284 (False positive: Possible null pointer reference)
2010-12-09 18:17:56 +01:00
Robert Reif
4d2c210f2a
Symbol database: use in checkmemoryleaks.cpp. ticket: #2219
2010-12-09 06:15:01 +01:00
Daniel Marjamäki
cad9c5f232
Fixed #2285 (False Positive: memory leak)
2010-12-08 21:02:02 +01:00
Robert Reif
c6e67d4aad
Symbol database: use symbol database in the memory leaks function checking. Ticket: #2219
2010-12-08 07:49:01 +01:00
Robert Reif
980a90071c
Fixed #2282 (Improve check: Function can be const)
2010-12-07 19:42:30 +01:00
Robert Reif
b6acfa809b
Symbol database: creates a single symbol database within Tokenizer on demand and changes all checks to use it
2010-12-07 07:08:49 +01:00
Robert Reif
271d8988aa
Symbol database: fixed a TODO test where class variables were qualified with the class name
2010-12-07 07:07:36 +01:00
Robert Reif
6c719c5806
Symbol database: removed unnecessary null pointer checks
2010-12-07 07:07:07 +01:00
Daniel Marjamäki
26864dd011
Memory leaks: Removed the experimental checking using ExecutionPath.
2010-12-06 21:46:18 +01:00
Daniel Marjamäki
0b696b7079
Fixed #2280 (Tokenizer::setVarId : variable id not set for inner iterator)
2010-12-06 17:52:44 +01:00
Robert Reif
626a814241
Symbol database: better handling of inline functions. Ticket: #2219
2010-12-05 20:26:52 +01:00
Daniel Marjamäki
b25e6ff24c
Fixed #2279 ((style) struct of union member is never used)
2010-12-05 18:33:53 +01:00
Robert Reif
c20b8831ee
Fixed #2275 (False Positive: Member variable not initialized in the constructor)
2010-12-04 20:24:13 +01:00
Robert Reif
04b811b74f
Fixed #2273 (False Positive: Member variable not initialized in the constructor)
2010-12-04 17:47:00 +01:00
Daniel Marjamäki
ab336b9088
Tokenizer: Added a few comments
2010-12-04 15:49:25 +01:00
Daniel Marjamäki
11a0ac4e07
xml2: rename '--xmlver' to '--xml-version'. bugfix in settings, change the type of _xml_version from bool to int.
2010-12-04 14:20:51 +01:00
Daniel Marjamäki
1f1df0645b
Merge branch 'xml2' of github.com:danmar/cppcheck
2010-12-04 14:06:57 +01:00
Kimmo Varis
d14b5039ce
Improve 'Use x.empty() instead of x.size() for emptiness' warning.
...
Improve the performance warning message as discussed at dev-forum:
https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192#p926
2010-12-04 10:15:48 +02:00
Kimmo Varis
8369d0ddd6
Improving 'Wrong assignment of auto variable' error message.
...
Improving the error message as discussed at dev-forum:
https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192&start=0
2010-12-04 09:55:20 +02:00
Robert Reif
758fc85a12
Memory leaks: Determine that some classes are not auto-deallocated. Reduce false negatives. Ticket: #2219 and #1618
2010-12-04 07:29:12 +01:00
Daniel Marjamäki
93ebdca313
Fixed #2264 (False positive: variable assigned value that is never used)
2010-12-03 18:45:49 +01:00
Robert Reif
b29568c81d
Fixed #2271 (Tokenizer: simplify Qt signals and slots)
2010-12-03 08:14:09 +01:00
Robert Reif
2cd8bc74cc
Symbol database: The symbol database has a bug where it can find an out of line constructor when looking for a destructor. Ticket: #2272
2010-12-03 07:35:06 +01:00
Daniel Marjamäki
8118e4755a
Fixed #2263 (False positive: variable assigned value that is never used)
2010-12-02 20:08:05 +01:00
Daniel Marjamäki
66f0948395
Preprocessor: Don't include system headers twice.
2010-12-02 18:07:32 +01:00
Robert Reif
eda4bcae29
Fixed #2271 (Tokenizer: simplify Qt signals and slots)
2010-12-02 17:41:49 +01:00
Daniel Marjamäki
af80384ae7
xml2: replace --xml2 with --xmlver=2. Ticket: #2106
2010-12-02 17:32:51 +01:00
Robert Reif
1bc8a2b6ba
Fixed #2172 (False positive: struct is not initialized in constructor)
2010-12-02 07:35:01 +01:00
Daniel Marjamäki
12c8eeff2c
xml2: Added experimental --xml2 result format. Ticket: #2106
2010-12-01 21:24:17 +01:00
Daniel Marjamäki
b4be71aa4e
checkuninitvar: fixed possible null-pointer dereference. thanks orbitcowboy for spotting it.
2010-12-01 18:05:57 +01:00
Robert Reif
f12c0c7ada
Tokenizer: add assert(_settings) to Tokenizer to insure the tokenizer always has settings. Ticket: #2219
2010-12-01 18:00:55 +01:00
Kimmo Varis
1a3175741f
Fixed #2268 ([GUI] Generic class name is shown for 'Message' while correct one for 'Summary')
2010-12-01 17:55:22 +02:00
Robert Reif
43dcc51752
Fixed #2252 (segmentation fault with enable=all)
2010-11-30 19:52:42 +01:00
Robert Reif
f90236a183
Fixed #2252 (segmentation fault with enable=all)
2010-11-30 19:40:32 +01:00
Daniel Marjamäki
0081800a20
Fixed #2261 (False positive: memory leak)
2010-11-30 19:36:04 +01:00
Daniel Marjamäki
6761765a70
Fixed #2262 (False positive: Resource leak: fd)
2010-11-30 19:14:31 +01:00
Daniel Marjamäki
234b1e0098
Fixed #2265 (False positive: Uninitialized variable: path)
2010-11-30 18:40:36 +01:00
Daniel Marjamäki
065af5c444
Fixed #2251 (False positive: Possible null pointer reference)
2010-11-29 20:30:23 +01:00
Daniel Marjamäki
cdb685c83c
Fixed #2245 (False positive: Possible null pointer dereference)
2010-11-29 20:19:31 +01:00
Daniel Marjamäki
4de64209fb
Fixed #2248 (memory leak : pointer inserted in an object)
2010-11-29 19:53:34 +01:00
Kimmo Varis
6bf0e7eb08
Remove extra space char from begin of verbose message.
2010-11-29 20:27:31 +02:00
Kimmo Varis
f467e3120e
Improve redundant STL container condition -message.
...
Have separate summary and verbose messages. Se discusion at forum:
https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192
2010-11-29 20:24:08 +02:00
Kimmo Varis
8d8945ac57
Improve "Assert statement 'varname' -message.
...
Modifying the message so that we have short message and verbose
message. As discussed in dev-forum:
https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192
2010-11-29 20:12:21 +02:00
Daniel Marjamäki
add8584612
Fixed #2232 (segmentation fault of cppcheck)
2010-11-29 17:46:10 +01:00
Kimmo Varis
564d896715
Run astyle.
2010-11-28 23:29:06 +02:00
Kimmo Varis
85735e382f
Improve the 'suspicious code sizeof sizeof' -message.
...
As discussed at dev-forum:
https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192
2010-11-28 14:20:46 +02:00