Commit Graph

57 Commits

Author SHA1 Message Date
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Dmitry-Me 4fc0a7998e Remove duplicate error reporting function 2017-11-14 21:46:17 +03:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Matthias Krüger 79010eecea lib: fix a bunch of warnings about differing function arguments in definition and declaration.
[lib/token.h:72] -> [lib/token.cpp:36]: (style, inconclusive) Function 'Token' argument 1 names different: declaration 'tokensBack' definition 't'.
    [lib/token.h:445] -> [lib/token.cpp:497]: (style, inconclusive) Function 'multiCompare' argument 1 names different: declaration 'needle' definition 'tok'.
    [lib/checkio.h:73] -> [lib/checkio.cpp:1385]: (style, inconclusive) Function 'ArgumentInfo' argument 3 names different: declaration 'isCPP' definition '_isCPP'.
    [lib/checkother.h:216] -> [lib/checkother.cpp:2136]: (style, inconclusive) Function 'checkComparisonFunctionIsAlwaysTrueOrFalseError' argument 2 names different: declaration 'strFunctionName' definition 'functionName'.
    [lib/errorlogger.h:214] -> [lib/errorlogger.cpp:51]: (style, inconclusive) Function 'ErrorMessage' argument 2 names different: declaration 'file0' definition 'file0_'.
    [lib/errorlogger.h:215] -> [lib/errorlogger.cpp:65]: (style, inconclusive) Function 'ErrorMessage' argument 2 names different: declaration 'file0' definition 'file0_'.
    [lib/library.h:327] -> [lib/library.cpp:1043]: (style, inconclusive) Function 'ignorefunction' argument 1 names different: declaration 'function' definition 'functionName'.
    [lib/mathlib.h:112] -> [lib/mathlib.cpp:1275]: (style, inconclusive) Function 'isNullValue' argument 1 names different: declaration 'tok' definition 'str'.
    [lib/preprocessor.h:91] -> [lib/preprocessor.cpp:122]: (style, inconclusive) Function 'setDirectives' argument 1 names different: declaration 'tokens' definition 'tokens1'.
    [lib/symboldatabase.h:860] -> [lib/symboldatabase.cpp:1801]: (style, inconclusive) Function 'argsMatch' argument 1 names different: declaration 'info' definition 'scope'.
    [lib/symboldatabase.h:1171] -> [lib/symboldatabase.cpp:2048]: (style, inconclusive) Function 'addClassFunction' argument 1 names different: declaration 'info' definition 'scope'.
    [lib/symboldatabase.h:1174] -> [lib/symboldatabase.cpp:2208]: (style, inconclusive) Function 'addNewFunction' argument 1 names different: declaration 'info' definition 'scope'.
    [lib/symboldatabase.h:1090] -> [lib/symboldatabase.cpp:3648]: (style, inconclusive) Function 'findVariableType' argument 2 names different: declaration 'type' definition 'typeTok'.
    [lib/symboldatabase.h:1101] -> [lib/symboldatabase.cpp:4308]: (style, inconclusive) Function 'findType' argument 1 names different: declaration 'tok' definition 'startTok'.
    [lib/symboldatabase.h:1176] -> [lib/symboldatabase.cpp:4349]: (style, inconclusive) Function 'findTypeInNested' argument 1 names different: declaration 'tok' definition 'startTok'.
    [lib/symboldatabase.h:1193] -> [lib/symboldatabase.cpp:4501]: (style, inconclusive) Function 'setValueType' argument 2 names different: declaration 'enumerators' definition 'enumerator'.
    [lib/path.h:159] -> [lib/path.cpp:247]: (style, inconclusive) Function 'isCPP' argument 1 names different: declaration 'extensionInLowerCase' definition 'path'.
    [lib/path.h:145] -> [lib/path.cpp:266]: (style, inconclusive) Function 'acceptFile' argument 1 names different: declaration 'filename' definition 'path'.
2017-04-03 00:06:46 +02:00
Daniel Marjamäki 279b66003b Fix Cppcheck warnings about mismatching argument names 2017-04-01 10:34:53 +02:00
Matthias Krüger 35e7697474 switch some functions from const to static, as cppcheck suggests. 2017-02-27 13:51:33 +01:00
Daniel Marjamäki 6b55acd7af CheckIO: Changed severity for '.. aka' warnings to portability. If type is compatible then it's just a possible portability issue. 2016-09-11 17:05:01 +02:00
PKEuS 851c6e0ed5 Improved buffer overflow checking for scanf: %c with a width (#3494) 2016-05-22 14:00:26 +02:00
amai2012 eba1b0881d Minor refactoring: use nullptr (instead of 0/NULL), change signature of Tokenizer::createTokens 2016-05-07 16:30:54 +02:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Daniel Marjamäki 37d9a95ef1 CheckIO: Refactoring. Split out CheckIO::checkFormatString() from CheckIO::checkWrongPrintfScanfArguments(). 2015-10-10 20:08:15 +02:00
PKEuS 1a266315f1 Removed some unused code 2015-08-15 19:17:25 +02:00
Daniel Marjamäki e578988832 invalidScanf: removed the checking for 'scanf crash with huge input data for old glibc'. new systems are not vulnerable to this bug anymore. 2015-08-14 08:03:46 +02:00
orbitcowboy 06e818f89d Running astyle, no functional change. 2015-06-17 09:09:23 +02:00
amai2012 33d7631ee3 Fix another Borlad-specific test by setting Windows platform type
Refactoring: make CheckIO::ArgumentInfo aware of language (C vs. C++) to perform some optimizations
2015-06-16 23:11:34 +02:00
Daniel Marjamäki 228f5960fc CheckIO: only report warnings when --enable=warning has been used 2015-01-06 15:08:25 +01:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Daniel Marjamäki 051d42ae6b astyle formatting 2014-11-20 14:20:09 +01:00
orbitcowboy f5d804f71a running astyle 2014-11-20 10:13:03 +01:00
Daniel Marjamäki fbc6323a9b doc: changed --doc output to Markdown syntax 2014-09-30 14:56:12 +02:00
PKEuS de66ed4071 Added missing message to --errorlist output, changed Id to avoid duplicate 2014-08-02 20:55:59 +02:00
Daniel Marjamäki 86ef5f8ae7 CheckIO: Handle library types 2014-06-12 07:01:44 +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
Daniel Marjamäki f31ec37d52 Fixed 2 Cppcheck warnings. Function can be static|const 2014-05-10 11:49:14 +02:00
PKEuS 86e6bb430a New check: Warning, if positioning operation (fseek) is performed on a file opened in "a" mode 2014-03-17 11:02:03 +01:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Robert Reif ac3b1c0611 Fixed #5134 (Memory leak below CheckIO::checkWrongPrintfScanfArguments()) 2013-11-01 05:42:37 +01:00
Robert Reif 94187c41c2 Fixed #5104 (False positive: Invalid argument in printf and scanf for vector template) 2013-10-27 10:48:49 +01:00
Robert Reif 5c4c397372 CheckIO: add scanf argument type checking. Floating point and integer checking is complete but string checking is incomplete and character checking is missing. Ticket #4099 2013-09-22 06:56:31 +02:00
Robert Reif 9be2f6b5d4 Fixed #4964 (printf format argument check only supports simple variables) 2013-09-08 20:21:00 +02:00
Daniel Marjamäki 40c5924292 CheckIO: Handle classes derived from STL 2013-09-07 07:20:06 +02:00
Robert Reif 921a1aaa4f CheckIO: Improved handling of %u 2013-09-05 01:46:58 +02:00
Ettl Martin 9ab6655d85 Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
Robert Reif 0dddd424a4 CheckIO: Improved handling of function return type 2013-09-03 05:50:19 +02:00
Robert Reif 05f2f0e419 CheckIO: improved type info - keep track of original typename. 2013-08-31 06:26:39 +02:00
Robert Reif 228f6b1a87 Fixed #4984 (False positive: (warning) %f in format string (no. 1) requires a floating point number given in the argument list.) 2013-08-27 05:46:09 +02:00
Robert Reif 01fd156852 CheckIO: Start to add checking of function return types. Ticket: #4964 2013-08-24 07:25:50 +02:00
Robert Reif 707dfb4eea Fixed #4964 (printf format argument check only supports simple variables) 2013-08-20 06:16:31 +02:00
Robert Reif 56d8073d0f Fixed #4902 (printf and scanf format checks don't support microsoft %I, %I32 and %I64 extensions) 2013-08-10 12:37:31 +02:00
PKEuS a9a5dc0354 Updated to AStyle 2.03, require this version 2013-08-07 16:27:37 +02:00
Simon Martin 1fe008ba4b Ensure wrongPrintfScanfParameterPositionError is shown by 'cppcheck --errorlist'. 2013-07-28 20:33:49 +02:00
Daniel Marjamäki 9ff204f8bc astyle formatting, use isEnabled("warning") instead of isEnabled("style") 2013-07-28 16:13:16 +02:00
Simon Martin d01e3fa17a Handle parameter positions format strings (POSIX extensions). 2013-07-28 15:00:28 +02:00
Robert Reif f11e54aa42 Fixed #4902 (printf and scanf format checks don't support microsoft %I, %I32 and %I64 extensions) 2013-07-21 08:35:01 +02:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Baris Demiray 0e100f7563 Fixed #4189 (Improve check (printf('%l') not detected)) 2012-10-21 08:50:29 +02:00
Reijo Tomperi 7ddd564ad6 Change file encoding to UFT-8 like it is for other files. 2012-08-26 00:12:38 +03:00
PKEuS 1b40668e04 Refactorizations:
- Made several functions (Check*::myName and others) because they don't touch depend on a specific instance. (cppcheck findings)
- Removed description of a check in CheckConst that has moved to CheckIO
2012-08-02 09:50:48 -07:00
PKEuS 1e704edbd5 Message refactorization: checkio.h/cpp 2012-07-13 10:36:58 -07:00