Commit Graph

57 Commits

Author SHA1 Message Date
Reijo Tomperi 125692bc65 Refactoring: CommonCheck.* files are removed. Rest of the global functions from there were moved to Tokenizer class 2008-11-21 21:14:24 +00:00
Reijo Tomperi 51e9d98a5f Refactoring: Errors are no longer logged via global functions to a global stream. Instead callback function is used via interface.
ErrorLogger interface was added and taken into use.
2008-11-20 22:19:26 +00:00
Reijo Tomperi 180e3b99e6 Refactoring: Some global functions moved to Tokenizer class 2008-11-20 20:54:52 +00:00
Daniel Marjamäki a8e1cd8920 Buffer overrun: Fixed a segmentation fault 2008-11-18 19:59:50 +00:00
Daniel Marjamäki 2dd4dba90e Array index overrun: Improved the checking of class variables 2008-11-16 18:21:46 +00:00
Reijo Tomperi aa579911ab Refactoring: Global variable tokenes is no more. 2008-11-16 15:58:52 +00:00
Reijo Tomperi ce08224547 Few static variables are now private members. ShowAll etc. global variables are now members of Settings class and given as a
parameter to the classes that need them.
2008-11-16 15:18:50 +00:00
Reijo Tomperi 08b25dc0d4 Refactoring: Global/Static variables, FunctionList, GlobalFunctions and UsedGlobalFunctions are now private members of Tokenizer class.
Class GlobalFunction is now private subclass of Tokenizer. 
Global functions CheckGlobalFunctionUsage, FillFunctionList and GetFunctionTokenByName are now member functions of Tokenizer.
2008-11-15 22:41:56 +00:00
Reijo Tomperi 1efb4c95a6 Refactoring: Global variable Files is no more. Use tokenizer->getFiles() to get a pointer to it. 2008-11-13 22:39:47 +00:00
Reijo Tomperi 0b1ee10353 Refactoring: tokens_back and TypeSize are no longer global variables 2008-11-12 22:50:40 +00:00
Reijo Tomperi 134985e410 Refactoring: Tokenizer object given as a parameter to most of the classes 2008-11-12 21:34:47 +00:00
Daniel Marjamäki d8f11d3142 Refactoring: Use 'Match' instead of direct comparisons 2008-11-11 17:22:40 +00:00
Reijo Tomperi f242c4fddd Refactoring: Following new classes were created:
CheckBufferOverrunClass
CheckClass
CheckHeaders
CheckMemoryLeakClass
CheckOther
Preprocessor
2008-11-11 06:42:09 +00:00
Reijo Tomperi ef9f472188 Refactoring: Tokenizer class added, functions still mostly static and
using globals
2008-11-09 07:19:53 +00:00
Daniel Marjamäki c220b061dc Refactoring TOKEN: Changed from struct to class 2008-11-06 18:31:39 +00:00
Daniel Marjamäki 69a3595f19 cleanup of UTF-8. Updated the Makefile 2008-11-06 00:11:37 +00:00
Daniel Marjamäki c16c12c70a Buffer overrun: Fixed a false positive 2008-11-05 23:49:46 +00:00
Daniel Marjamäki 5b9aa96aba Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
Daniel Marjamäki ae322b5f45 made cppcheck compile with g++ 4.3 2008-08-30 18:29:37 +00:00
Daniel Marjamäki a282495c2a buffer overruns: added tests and improved the checking 2008-08-12 06:39:41 +00:00
Daniel Marjamäki ece441d952 CheckBufferOverrun: Refactoring and made the checking smarter 2008-05-10 13:48:15 +00:00
Daniel Marjamäki aef0278e43 CheckBufferOverrun: Fixed minor bug that resultet in false positives 2008-05-10 12:12:50 +00:00
Daniel Marjamäki 137a4c6309 CheckBufferOverrun: Removed a false positive 2008-04-06 11:53:23 +00:00
Daniel Marjamäki c56cfb5305 Match: Added matching for [] 2008-04-02 09:37:05 +00:00
Daniel Marjamäki 60e454fa11 Minor updates. Removed some false positives when checking variable scope 2008-04-01 06:21:12 +00:00
Daniel Marjamäki 4691999ede Refactoring: Replaced deprecated "match" with the new "Match" 2008-03-28 07:18:03 +00:00
Daniel Marjamäki bf6926232b CheckBufferOverrun: Improved checking of arrays declared like this: "type * var [ num ]" 2008-03-27 05:41:21 +00:00
Daniel Marjamäki 021b86afa2 test cppcheck: All tests work 2008-03-26 07:18:40 +00:00
Daniel Marjamäki b011228fce Fixed bugs in 'CheckBufferOverrun.cpp' 2008-03-25 17:10:52 +00:00
Daniel Marjamäki 5296377c52 To compile with borland, 'algorithm' was needed 2008-03-25 05:52:28 +00:00
Daniel Marjamäki fcff7a4052 Refactoring of 'CheckBufferOverrun.cpp' 2008-03-24 19:32:17 +00:00
Daniel Marjamäki 41252ac45a Refactoring 'CheckBufferOverrun'. Added 'Match1'. 2008-03-24 16:24:07 +00:00
Daniel Marjamäki 1e379b8ffa Refactoring the 'CheckBufferOverrun' 2008-03-24 11:51:16 +00:00
Daniel Marjamäki 954cccf843 Removed checking of 'dynamic data' it's impossible to determine if it's
false or true positives without deeper analysis.
2008-03-24 11:00:04 +00:00
Daniel Marjamäki c327dc10d8 Made the checking for buffer overruns more generic 2008-03-24 10:03:45 +00:00
Daniel Marjamäki b7477cb27f Combined 'findfunction' and 'FindFunction'. Updated "CheckBufferOverrun"
(checking for-loops).
2008-03-24 07:24:49 +00:00
Daniel Marjamäki 4c17dd9499 Buffer overrun in function parameter 2008-03-23 16:18:31 +00:00
Daniel Marjamäki 44bee90d82 Refactoring (Replace '->' with '.', use matching function when possible) 2008-03-23 14:15:44 +00:00
Daniel Marjamäki 75debeba37 Reverted 205:207 2008-03-23 13:38:01 +00:00
Daniel Marjamäki 34a2fdfb37 Refactoring 2008-03-23 13:27:34 +00:00
Daniel Marjamäki 3dfc79d3b6 Refactoring: Use 'setindentlevel' 2008-03-23 07:57:27 +00:00
Daniel Marjamäki 0d0f562e90 Refactoring: Added helper function 'setindentlevel' 2008-03-22 20:14:25 +00:00
Daniel Marjamäki ede402a5ec Minor refactoring 2008-03-22 17:09:08 +00:00
Daniel Marjamäki ab7cb379af In the checks, use const pointers 2008-03-22 11:46:06 +00:00
Daniel Marjamäki 13f681879f Handling pointers in 'CheckBufferOverrun_StructVariable' 2008-03-21 18:55:29 +00:00
Daniel Marjamäki 0a86992806 Check for buffer overruns for struct members (only numeric) 2008-03-21 17:25:25 +00:00
Daniel Marjamäki e9682bbb0e Fixed bug (Dereferencing NULL) 2008-02-21 20:17:18 +00:00
Daniel Marjamäki eb0361d6b5 Command line options: Added "--all" and "--style", removed "-w" 2007-07-20 15:43:39 +00:00
Daniel Marjamäki 3ee0d3c9d3 Improved the buffer overrun checks. Results that are not 100% certain must be enabled through the "-w". 2007-07-19 06:21:01 +00:00
Daniel Marjamäki 93b3e2e5aa Buffer overruns, using string with unknown length 2007-07-18 06:12:16 +00:00