Commit Graph

11629 Commits

Author SHA1 Message Date
Matthias Krüger cb50c92d08 htmlreport: splitup HTML_HEAD where we want to insert the list of errors. 2014-06-01 09:37:17 +02:00
Matthias Krüger ca4a0af840 htmlreport: remove redundant <style> tags, make html output readable. 2014-06-01 09:37:17 +02:00
Matthias Krüger 9e90bed9bb htmlreport: make link to index page ("Defect list") fixed on the screen so we can always access it regardless of how low we scrolled. 2014-06-01 09:37:17 +02:00
Pierre Schweitzer 1cf2e36dd5 Add a new test for OpenFile function from windows.cfg.
It is here as a reminder for a TODO. When used with OF_EXIST flag, the function OpenFile doesn't return a handle and thus, doesn't leak any resource.
As cppcheck doesn't support such feature yet, it's added a TODO not to be forgotten for later fix when cppcheck supports this.

Also added a naive check, just to ensure the OpenFile check doesn't get broken when adding support for OF_EXIST.
2014-06-01 00:00:49 +02:00
Martin Ettl af369b4925 astyle run [ci skip] 2014-05-16 23:01:21 +02:00
amai2012 6f31ce334d #5875 Fix 'lib/mathlib.cpp:559:43: runtime error: division by zero'. Several fixes to MathLib::divide(): avoid division by zero, handle various representation of 0 value, use 'nan.' instead of '-nan.0' 2014-05-31 18:25:23 +02:00
Daniel Marjamäki 46bf23aa6d TokenList: added assertion that makes sure the Preprocessor doesn't let through extended ascii wrongly. 2014-05-31 18:02:19 +02:00
amai 98ea1397b3 #5875 clang ubsan errors: lib/checkassignif.cpp:58:34: runtime error: member call on null pointer of type 'Token' 2014-05-31 15:12:04 +02:00
Daniel Marjamäki 66ad3c97b9 Fixed #5857 (strPlusChar: Crash on invalid code 'int+;') 2014-05-31 10:34:00 +02:00
PKEuS 86dede14c0 Merge pull request #327 from simartin/only_fill_if_needed
Only fill total_size in CheckBufferOverrun::checkFunctionParameter when useful
2014-05-30 20:56:33 +02:00
Daniel Marjamäki 70b4c945de Fixed #5874 (False positive: 'opposite conditions in nested if' with arrays) 2014-05-30 19:19:24 +02:00
Simon Martin f7356dd8c7 Only fill total_size in CheckBufferOverrun::checkFunctionParameter when it's useful. 2014-05-29 23:51:13 +02:00
amai2012 92759dfd9d Merge pull request #326 from simartin/ticket_5615_avoid_useless_similar_calls
Ticket #5615: Avoid calling the same function n times when once is enough
2014-05-29 21:52:22 +02:00
Simon Martin 139f87af18 Ticket #5615: Avoid calling the same function n times when once is enough. 2014-05-29 19:58:09 +02:00
Alexander Mai 707ee97b9e Fix missing break while handling SIGBUS - fixes clang compiler warning 2014-05-29 16:57:45 +02:00
Daniel Marjamäki bc2ba1706b cleanup redundant valueflow check. if there are no values the getValue will return NULL. 2014-05-28 21:03:16 +02:00
orbitcowboy 27cee5caa5 Fixed CID 1216439: potential copy&paste error in testing symbol database. 2014-05-28 17:05:42 +02:00
XhmikosR 610f099487 GUI: Minor image compression improvements.
Before: 24.321 bytes
After:  24.272 bytes

[ci skip]
2014-05-28 08:17:47 +03:00
PKEuS c23afbd04a Merge pull request #325 from simartin/checkio_types_match_factorize
Factorize type name equality checks in CheckIO
2014-05-27 21:46:07 +02:00
PKEuS 119a84011c Merge pull request #324 from simartin/char_array_overrun_test
Added a test for out-of-bounds character array access.
2014-05-27 21:45:17 +02:00
Simon Martin d2223ce419 Factorize type name equality checks in CheckIO. 2014-05-27 19:20:19 +02:00
Simon Martin 966491d40b Added a test for out-of-bounds character array access. 2014-05-27 16:21:13 +02:00
Daniel Marjamäki ae6c97eb39 GUI: Show validation errors when loading library fails. Ticket #5847 2014-05-26 20:16:19 +02:00
Daniel Marjamäki dc798baa37 Merge pull request #320 from tarnhold/master
htmlreport: Generate file list sorted by file name
2014-05-26 18:34:51 +02:00
Daniel Marjamäki ed78d3e148 Library: Better error reporting when loading fails 2014-05-26 17:00:41 +02:00
PKEuS 1cb14f687f Merge pull request #322 from simartin/del_useless_fwd_decl
Remove unnecessary declaration (one line before the actual definition...)
2014-05-25 23:54:20 +02:00
PKEuS 8f083af1e4 Attempt to fix travis build 2014-05-25 22:11:56 +02:00
Simon Martin c027c526a9 Remove unnecessary declaration (one line before the actual definition... 2014-05-25 22:04:51 +02:00
PKEuS a407b55945 Added support for lambdas to AST
Fixed bug that return statement left an operand on the stack
2014-05-25 21:55:39 +02:00
Thomas Arnhold e63c61a1cf htmlreport: Generate file list sorted by file name 2014-05-25 18:58:51 +02:00
Alexander Mai 7b36bbbba8 Exception handling: catch SIGBUS. Evaluate siginfo_t::si_code 2014-05-25 15:53:26 +02:00
Toralf Förster 2d4bae0110 htmlreport: print the cppcheck version in the footer of the report 2014-05-25 14:36:52 +02:00
PKEuS 04f3caf8e8 Fixed debug message #5159 2014-05-25 14:16:03 +02:00
PKEuS 4f61e9783b Fixed VS warnings in testsymboldatabase.cpp 2014-05-25 14:16:03 +02:00
Daniel Marjamäki d3dbfad131 GUI, manual: some clarifications how custom user .cfg files are used (Ticket: #5847) 2014-05-25 13:24:07 +02:00
Alexander Mai 5198c05f35 --exception-handling now takes optional argument to choose between stdout and stderr for its output. stdout is new default value 2014-05-25 08:47:37 +02:00
toralf 97894c298c Link to IRC channel instead of just mentioning it. 2014-05-24 20:47:27 +02:00
PKEuS 55c87248ba Fixed crash on complex cast. 2014-05-24 20:21:08 +02:00
PKEuS d42275c5f1 Fixed TODO in checkAssignBoolToFloat 2014-05-24 20:06:45 +02:00
Alexander Mai e6a394d514 CheckBool::checkAssignBoolToFloat() - don't crash on unknown variables 2014-05-24 19:15:43 +02:00
PKEuS 38aaa46804 Stabilized AST:
- Fixed broken simplification causing crashs when cast was followed by unary minus (real world examples from arch/parisc/math-emu/ (linux-kernel))
- Stabilized determination of unary and binary operators
2014-05-24 19:05:04 +02:00
Alexander Mai 2c8087e34f #4375 New check: add style warning about 'double d=false;' Add a new check to CheckBool. Also implement Variable::isFloatingType() 2014-05-24 18:35:49 +02:00
PKEuS effa38c322 Fixed #5863 (False positive: array index is used before limits check) 2014-05-24 17:50:01 +02:00
Daniel Marjamäki bb8973aac7 Updated Makefile 2014-05-24 12:54:16 +02:00
PKEuS a04036337d Fixed #5860: Don't show returnTempReference for calculations on unknown types 2014-05-24 12:50:04 +02:00
PKEuS adf38fcfd0 Further include cleanup 2014-05-24 12:50:04 +02:00
PKEuS 1fc1ff1993 Moved implementation of two functions to new file check.cpp -> Don't include <iostream> everywhere 2014-05-24 12:50:04 +02:00
PKEuS 8f79dc3ff8 Cleaned up includes and forward declarations in checkers:
- Removed definitely unnecessary forward declarations (e.g. "class Token"; token.h is already included by check.h, so a definition is unnecessary)
 - Removed unused includes
2014-05-24 12:50:03 +02:00
amai2012 00e28de3b7 Merge pull request #315 from simartin/ticket_5823
Ticket #5823: Properly count template parameters in TemplateSimplifier::useDefaultArgumentValues
2014-05-24 11:47:14 +02:00
PKEuS b78131cfcf Improved cast detection in AST:
-> Make use of it in checkother.cpp

Use tokenizer simplification instead of reimplementation for test suite
2014-05-24 11:29:32 +02:00