Jonathan Neuschäfer
4fb7865f49
fix typos using codespell
...
Codespell is available at http://git.profusion.mobi/cgit.cgi/lucas/codespell/ .
2011-10-13 22:04:41 +02:00
Daniel Marjamäki
6f8e42a5af
changed the astyle formatting flags
2011-10-13 20:53:06 +02:00
Edoardo Prezioso
b792efb761
Fix ticket 3140 and 3137 (Improve Tokenizer: Remove dead for loop - simplify while(0) better.
...
Note: it doesn't remove dead code if there's a label inside. Will be improved in another ticket.
2011-10-13 13:01:24 +02:00
Edoardo Prezioso
16506f0a8c
Remove redundant simplifyDeadCode call inside the Tokenizer::tokenize and move the relative tests in the file 'testsimplifytokens.cpp'.
2011-10-13 12:26:27 +02:00
Zachary Blair
82366918ff
Fixed #2627 (switch case fall through: redundant strcpy)
2011-10-13 01:27:22 -07:00
PKEuS
91d7621994
Fixed #3180 (New check: Detect nullpointers given to printf via variable argument list)
2011-10-12 22:11:27 +02:00
Daniel Marjamäki
74c0468a18
astyle formatting
2011-10-12 22:06:19 +02:00
Kimmo Varis
4c24b6a804
GUI: Rename ErrorItem::id to ErrorItem::errorId.
2011-10-12 22:19:08 +03:00
Daniel Marjamäki
b73896bcc5
Fixed #3163 (Out of bounds pointer arithmetic not reset)
2011-10-12 20:54:39 +02:00
Daniel Marjamäki
371871b0b7
Tokenizer::removeMacrosInGlobalScope: Don't remove C/C++ keywords namespace/struct/etc. Ticket: #3193
2011-10-12 19:23:39 +02:00
Daniel Marjamäki
cf39ece8da
Fixed #3150 (Invalid warning when pointer difference is not adjacent)
2011-10-12 19:01:44 +02:00
Robert Reif
ee04c1bfb7
fix #3194 (Parsing glitch causes false 'can be const' error for an 'if' statement)
2011-10-12 09:10:34 -04:00
Robert Reif
af6a6f9c2d
run astyle
2011-10-12 09:08:54 -04:00
Marek Zmysłowski
07d8cd0a12
improved realloc checking '*p = realloc(*p,..'. Ticket: #1791
2011-10-11 22:07:14 +02:00
Kimmo Varis
00ae7dbda3
GUI: Move ShowTypes enum to own class and file.
...
We are using ShowTypes around the GUI codebase so it makes sense
to have it in its own class. And the class also contains related
helper functions instead of scattering them around different
classes.
ShowTypes also contains the visibility settings for all the
GUI severities. Implementation in this commit makes ShowTypes
class to load the visibility settings when it is created. And save
the settings when it is destroyed.
2011-10-11 22:20:36 +03:00
Thomas Jarosch
849bee8437
[PATCH] Detect suspicious use of semicolon after 'if/for/while'
...
statements if they are followed by a {..} block.
Examples are:
for (int i = 0; i < 10; ++i);
{
printf("i)";
}
or
if (i == 100);
{
die("Wrong argument");
}
This new check is active if you enable inconclusive checks.
2011-10-11 08:41:39 +02:00
Zachary Blair
fcf360825a
Fixed #2955 (New check: Using && instead of &)
2011-10-10 10:11:17 -07:00
Edoardo Prezioso
742858b67c
Fixed some simple errors in some old commits.
2011-10-10 17:18:47 +02:00
Edoardo Prezioso
af23a9dcbb
Fixed ticket #3140 (Improve Tokenizer: Remove dead for loop 'for (int i = 0; i < 0; ++i)')
2011-10-10 15:15:45 +02:00
PKEuS
5f9b916dcc
Fixed #2115 (new check: endless loop (unsigned comparison that is always true))
2011-10-09 20:35:46 +02:00
Reijo Tomperi
1c9ae6937c
Fix compiling on VC++ after previous commit
2011-10-09 21:14:44 +03:00
Reijo Tomperi
e87628b72f
Filter out duplicate error messages in cli.
2011-10-09 21:03:38 +03:00
Daniel Marjamäki
96beb94b21
Fixed #3183 (False positive: (error) syntax error)
2011-10-09 18:42:36 +02:00
Daniel Marjamäki
175503ef94
Null pointer: improved inconclusive checking in CheckNullPointer::nullPointerAfterLoop
2011-10-09 15:09:02 +02:00
seb777
1d9a99012b
Fixed 3133 (Improve Check: Found obsolete function)
...
- add check for std::gets
- improve check when multiple obsolete functions are used
- remove false positive (declared functions)
2011-10-09 10:31:21 +02:00
Edoardo Prezioso
9270b84d64
More fixes to the label simplifier (related to ticket 3176):
...
1)Simplify the labels if there are combinations of the symbols '*','&','{' and '(' after a '%var% :' and before another '%var%';
2)but do not simplify the label if it's inside an unpreprocessed macro code.
2011-10-08 21:13:53 +02:00
Daniel Marjamäki
bc69881607
manual: removed appendix. That info are available in separate articles.
2011-10-08 13:45:53 +02:00
Daniel Marjamäki
0b09732881
Null pointers: fixed false negatives when there are '(p && ..'
2011-10-08 12:58:10 +02:00
Thomas Jarosch
7d13d25638
Fixed #3181 (Add missing return statements)
2011-10-08 12:45:56 +02:00
Stefan Weil
bf25340fd3
Settings: add missing initialisation for member variable c99 (reported by Valgrind)
2011-10-08 10:29:11 +02:00
Daniel Marjamäki
4424a7afb8
createrelease: added info about how scp is used to upload files to release system
2011-10-08 10:16:38 +02:00
Daniel Marjamäki
47d8752098
Makefile: Set debug mode
2011-10-08 08:06:24 +02:00
Daniel Marjamäki
d32b288e4e
1.51: Updated Makefile for release
2011-10-08 07:55:54 +02:00
Daniel Marjamäki
234b98f347
1.51: Updated Changelog
2011-10-08 07:48:29 +02:00
Daniel Marjamäki
5c08979920
1.51: Updated versions
2011-10-08 07:45:39 +02:00
Daniel Marjamäki
37d4a01dcb
Added todo comments to fix false negatives caused by my fix for #3128
2011-10-08 07:39:20 +02:00
Daniel Marjamäki
e2ec5a127f
Fixed #3128 (False positive: null pointer dereference check does not handle complex boolean logic properly)
2011-10-07 21:08:21 +02:00
Daniel Marjamäki
12218e1bff
Fixed #3115 (note windows limitation to threading in the manual)
2011-10-07 19:26:53 +02:00
Kimmo Varis
3b82c26a70
GUI: Update translation files.
2011-10-07 20:09:15 +03:00
Robert Reif
a1a839fadc
fix tokenizer and symbol database to not mistake goto statement for variable declaration
2011-10-07 08:11:48 -04:00
Robert Reif
7dd001c9a9
run astyle
2011-10-06 21:10:20 -04:00
Edoardo Prezioso
80df7ea839
Fixed ticket #3176 (cppcheck reports wrong unused variable)
...
Label simplification didn't take count of the '(' parenthesis or the '&' and '*' operators inside or outside the parenthesis after the colon.
2011-10-07 00:54:44 +02:00
Edoardo Prezioso
fe4ce594ce
Renamed the function 'removeRedundantCodeAfterReturn' with 'simplifyDeadCode'.
...
This is a preparation in order to add new features to this function (see the @todo in the tokenize header file, ticket #3113 and #3175 for details).
2011-10-06 22:40:39 +02:00
Daniel Marjamäki
73fb6725e6
Readded CheckOther::bitwiseOnBoolean as inconclusive check
2011-10-06 22:01:48 +02:00
Marek Zmysłowski
307dd00efb
Fixed #3072 (improve check: deprecated function alloca)
2011-10-06 08:10:51 +02:00
Daniel Marjamäki
09109f19f8
Removed CheckOther::bitwiseOnBoolean check. The reasons can be seen in my comments in ticket #3062 .
2011-10-05 20:46:07 +02:00
PKEuS
494d3af3d1
Fixed #1877 (Be more strict about int vs. bool, part II)
2011-10-05 20:30:36 +02:00
Thomas Jarosch
abd2525339
Fixed #3161 (Show buffers size info for snprintf() buffer overruns)
2011-10-05 20:17:57 +02:00
Edoardo Prezioso
d741f64256
Merge branch 'master' of github.com:danmar/cppcheck
2011-10-05 19:52:49 +02:00
Kimmo Varis
3cfe7ca1a7
Move "information" errors to "style" errors.
...
"information" severity is documented in lib/errorlogger.h as:
Checking information.
Information message about the checking (process) itself. These
messages inform about header files not found etc issues that are
not errors in the code but something user needs to know.
It IS NOT for errors in the code. All the current "information"-
severity errors fit nicely into description of the "style"-
severity.
We definitely need to separate processing information and actual
errors in the code. It is highly confusing for users to mix these
two different things. Hence all current "information" code error
messages are moved to "style" category.
Ticket: #3165 (Stop misusing the 'information' error severity!)
2011-10-05 20:44:00 +03:00