Commit Graph

12124 Commits

Author SHA1 Message Date
Alexander Mai b0c34390cd Fix FP: tmpnam() expects a valid pointer, an uninitialized array (of conforming size) is fine 2014-09-27 20:29:54 +02:00
PKEuS e1218cf846 Support allocation of array of pointers with operator new in checkmemoryleak.cpp 2014-09-27 11:25:08 +02:00
PKEuS 812bc6bdaf CheckVaarg::va_list_usage(): Bailout when try{} block is encountered (#6186) 2014-09-27 11:03:58 +02:00
Alexander Mai 21c85118d6 #6189 assign with operator= a '\0' to a std::string is not an error 2014-09-26 20:40:44 +02:00
PKEuS de13ad7eca Improved simplifications of redundant loops:
- Execute simplifyWhile0 after simplifyKnownVariables (#394)
- Support declaration of variable in loop header in removeRedundantFor
2014-09-26 10:47:05 +02:00
Gianfranco Costamagna 3eafb2b5c4 Makefile: Fix DESTDIR handling 2014-09-25 18:50:48 +02:00
Lauri Nurmi e3bdc37b0c Fix compilation (on Cygwin), by adding the necessary includes. 2014-09-25 05:32:30 +02:00
amai2012 ba3e93aec1 Merge pull request #447 from lanurmi/compile-fix-main
Fix compilation (on Cygwin), by adding the necessary includes.
2014-09-24 22:22:39 +02:00
Lauri Nurmi 17d6903d00 Fix compilation (on Cygwin) after commit f63dc86f, by adding the necessary includes.
No idea why this problem has not shown up on other platforms; the includes are by no means Cygwin-specific.
2014-09-24 22:43:24 +03:00
Robert Reif 1729ea6f0f Fixed #6182 (Format specifier check confused by ternary operator) 2014-09-24 16:45:06 +02:00
Matthias Krüger 7d85cb37ed run dmake 2014-09-24 13:50:57 +02:00
PKEuS 20966c5c37 Added test file for garbage code:
- cppcheck should be run entirely on garbage code to ensure that no check crashs/hangs on it (TODO).
- All garbage code tests should be moved here (TODO, so far only those from testtokenize.cpp were moved)
2014-09-24 13:45:56 +02:00
PKEuS 3cf6c19a4b Avoid loading the same .cfg file 30 times in testsimplifytokens.cpp 2014-09-24 13:26:52 +02:00
PKEuS affd0ffdfd Splitted large groups of tests out of testsimplifytokens.cpp and testtokenize.cpp 2014-09-24 13:23:44 +02:00
PKEuS 0cc5b67bf6 Avoid copying std::list object in valueFlowAfterAssign 2014-09-24 13:22:22 +02:00
Robert Reif 194e4a71a4 Symbol database: handle anonymous namespace 2014-09-24 06:09:08 +02:00
PKEuS 1e8c7e102d Revert "run dmake"
This reverts commit 8ccf9eed09.
2014-09-23 21:04:31 +02:00
PKEuS 6dc5b1725e Restored files removed in 1cc872f5b2 2014-09-23 21:02:46 +02:00
Matthias Krüger 8ccf9eed09 run dmake 2014-09-23 16:20:19 +02:00
Lauri Nurmi 1cc872f5b2 Change "obsolete" in all filenames into "obsolescent", and also update all references to such files.
Neither the C standard, the C++ standard, or POSIX talks about "obsolete". All of them use the word "obsolescent", which is a different word with a different meaning.
2014-09-23 16:18:04 +02:00
Daniel Marjamäki ee93d30d94 ValueFlow: improved valueflow for loops that assign variable and then break 2014-09-23 16:06:02 +02:00
Daniel Marjamäki dc9b1f09ae astyle formatting
[ci skip]
2014-09-23 16:04:38 +02:00
Dmitry-Me f63dc86f03 Must catch and translate exceptions on top level 2014-09-23 06:10:41 +02:00
amai2012 47a3548bea Merge pull request #446 from Dmitry-Me/eliminateDualSearch
Cache search result to avoid dual search
2014-09-22 20:48:36 +02:00
Dmitry-Me b17f2eea16 Cache search result to avoid dual search 2014-09-22 15:54:17 +04:00
amai2012 0818102758 Merge pull request #444 from simartin/testsymboldatabase_valid
Make TestSymbolDatabase::hasClassFunction's code snippet valid.
2014-09-21 21:50:53 +02:00
Simon Martin 0222c50d4a Make TestSymbolDatabase::hasClassFunction's code snippet valid. 2014-09-20 14:51:58 +02:00
Matthias Krüger 9bdeea5642 tinyxml: update to latest git version 5321a0e (v2.2.0) (https://github.com/leethomason/tinyxml2) 2014-09-19 19:09:13 +02:00
PKEuS 2068b91fbf Merge pull request #442 from Dmitry-Me/removeComparisonDuplication
Move variable declarations, remove unneeded assignments, remove comparis...
2014-09-19 18:19:46 +02:00
Dmitry-Me ebf1764bcc Move variable declarations, remove unneeded assignments, remove comparison duplication 2014-09-19 11:29:31 +04:00
amai2012 77f341be97 Merge pull request #440 from Dmitry-Me/renameVariablesReduceActions
Cleanup variable names, reduce unneeded operations
2014-09-17 18:39:17 +02:00
Jonathan Thackray 2b3ef83f26 Fixed #5747 (When socket() returns -1 on error, this shouldn't be marked as a resource leak) 2014-09-17 18:37:41 +02:00
PKEuS 5dd51f961d Merge pull request #439 from Dmitry-Me/moveDeclarationMergePatterns
Merge overlapping patterns, move declarations
2014-09-17 18:28:33 +02:00
Dmitry-Me 57c379d300 Cleanup variable names, reduce unneeded operations 2014-09-17 15:52:03 +04:00
Matthias Krüger c70425c06e showtime: print possible options when invalid mode is given. 2014-09-17 12:49:59 +02:00
Dmitry-Me 32f7a789df Merge overlapping patterns, move declarations 2014-09-17 10:54:53 +04:00
amai2012 776e720d8f Merge pull request #438 from Dmitry-Me/moveDeclarationReorderCheck
Move declaration, run check earlier
2014-09-16 20:50:04 +02:00
Daniel Marjamäki f93cf9d1b7 Fixed #6170 (Tokenizer: sizeof on array in 2d-array is not handled properly) 2014-09-16 17:21:17 +02:00
Dmitry-Me 7c4b9bed9e Move declaration, run check earlier 2014-09-16 13:34:16 +04:00
PKEuS 67c9356455 Merge pull request #437 from Dmitry-Me/reorderChecksUnwrapCode
Reorder checks, unwrap code
2014-09-16 10:53:42 +02:00
Dmitry-Me 6f9730b1d8 Reorder checks, unwrap code 2014-09-16 10:17:06 +04:00
Dmitry-Me b479948f0f Refactoring: Merge overlapping Token::Match function calls 2014-09-16 06:22:16 +02:00
Alexander Mai 98d4c944e3 #6163 False nullPointer for strtok(NULL, ...). Correct std.cfg 2014-09-15 20:57:34 +02:00
Daniel Marjamäki bbbe2c1b94 Fixed #6169 (False positive: passing uninitialized struct buffer member to strncpy) 2014-09-15 15:58:21 +02:00
PKEuS cafddcb109 Fixed wrong function log10 being recommended instead of log1p 2014-09-14 13:36:12 +02:00
Daniel Marjamäki 29a49d0641 removed some redundant null pointer checks before calling Token::Match 2014-09-14 11:35:04 +02:00
Simon Martin 53b58f0ed9 Refactoring. Use Token::Match instead of hardcoded patterns to increase readability. 2014-09-14 11:26:16 +02:00
Daniel Marjamäki d354cdc02c Fixed #6168 (False positive: sign conversion for inner calculation) 2014-09-14 10:29:58 +02:00
Daniel Marjamäki 865a252c89 astyle formatting
[ci skip]
2014-09-14 10:29:12 +02:00
PKEuS 27459761c9 Merge pull request #434 from simartin/ticket_6121
Ticket #6121: Report a syntax error for invalid enum initializers.
2014-09-13 21:11:19 +02:00