Commit Graph

18102 Commits

Author SHA1 Message Date
orbitcowboy 7bb806c22b windows.cfg: Added support for CLSTX constants which are defined at https://msdn.microsoft.com/en-us/library/windows/desktop/ms693716(v=vs.85).aspx. 2018-06-08 14:33:13 +02:00
Daniel Marjamäki 84f0a18053 passedByReference: avoid false positives for std::pair 2018-06-08 10:19:02 +02:00
Daniel Marjamäki 44c78d1770 passedByReference: avoid false positives for std::function 2018-06-08 08:40:14 +02:00
Daniel Marjamäki de09c117bf Fixed #8618 (False positive: shared_ptr is passed by reference by intention) 2018-06-07 22:39:21 +02:00
orbitcowboy cb2880e7c1 windows.cfg: Added support for _mbsncpy_s_l() and _mbsncpy_s(). 2018-06-07 15:35:00 +02:00
orbitcowboy c31503557d windows.cfg: Added support for _wcsncpy_s_l(). 2018-06-07 15:24:26 +02:00
orbitcowboy 8472779c00 std.cfg: Added support for wcsncpy_s(). 2018-06-07 11:57:03 +02:00
amai2012 f947b3b025 Fix some doxygen warnings 2018-06-07 08:33:32 +02:00
Daniel Marjamäki 1abc9008d8 Fixed #8573 (FP noCopyConstructor - derive from noncopyable class) 2018-06-06 16:02:25 +02:00
amai2012 453c663fb0
#8611 Rename xmlV2.rng. Renaming it to cppcheck-errors.rng (#1278) 2018-06-06 15:25:09 +02:00
Daniel Marjamäki 4da406baab GUI: Better handling of addon output 2018-06-06 15:01:06 +02:00
Konrad Grochowski 06f19fb3a7 misra.py: template used for error reporting will now be configurable (#1279)
WARNING: breaking change - now default misra.py report style will be the
same as cppcheck itself, but previosly misra.py default template was a
little different
2018-06-06 14:53:09 +02:00
orbitcowboy cc0f3f6cec Formatted code, there are no functional changes [ci skip]. 2018-06-06 11:15:47 +02:00
amai2012 3619aece02 Add support for umask functions 2018-06-06 10:59:34 +02:00
Sebastian ae5da13f3a
qt.cfg: Add obsolete functions with warning and one alternative one. (#1277)
For qInstallMsgHandler there is an alternative function qInstallMessageHandler. Both are added.
For qsrand and qrand there is only a hint that the class QRandomGenerator should be used instead.
Reference: https://doc.qt.io/qt-5/qtglobal-obsolete.html
2018-06-05 21:10:35 +02:00
orbitcowboy 79f70cbb32 misra.py: restored previous output style. The output style was broken by 0c6d60d202. 2018-06-05 14:16:25 +02:00
Sebastian 7c9b6d9bb0
checkother.cpp: Fix typo in symbol placeholder in error message. (#1276) 2018-06-05 10:24:19 +02:00
Daniel Marjamäki b9c1308a81 Fixed #8575 (false positive: longCastAssign) 2018-06-04 22:51:21 +02:00
Konrad Grochowski 0c6d60d202 MISRA - support for per file/line error suppression (#1275)
* cppcheckdata.py: fixed Suppression.isMatch method

* cppcheckdata.py: fixed parsing <suppressions> tag

* misra.py: now uses cppcheckdata.reportError and supports suppressions
2018-06-04 21:50:21 +02:00
orbitcowboy 74b18d7fd9 windows.cfg: Added support for _strncpy_s_l(). 2018-06-04 16:58:09 +02:00
Swasti Shrivastava bdb372f929 Modified rule 14.1 (#1267)
* Modified rule 14.1

* Made suggested changes

* Added findCounterTokens

* Removed hasFloatComparison

* Improved isFloatCounterInWhileLoop

* Made all required minor changes
2018-06-04 10:12:51 +02:00
Daniel Marjamäki 7b106c067a Fixed #8603 (SymbolDatabase: 2 scopes with same function) 2018-06-03 23:14:24 +02:00
Daniel Marjamäki df9b243227 Modernize: use ranged for loops in CheckNullPointer 2018-06-03 09:27:18 +02:00
Susi Lehtola 3f4aae75e2 LinguistTools is not a library. (#1274) 2018-06-03 07:13:39 +02:00
Susi Lehtola f2fc38a5b4 Use modern CMake syntax. (#1273)
* Use modern CMake syntax.

* Update way of finding Qt5 components
2018-06-02 18:31:33 +02:00
Matthias Krüger 0771a81969 Revert "tokenlist::iscast(): save a few pointer dereferences."
This reverts commit e187fdb696.
2018-06-02 15:57:56 +02:00
rebnridgway d3b231214d TemplateSimplifier optimisation. measured time improvement for cryptopp/test.cpp is ~8.4s => ~8.35s 2018-06-02 13:49:14 +02:00
Matthias Krüger 558a2f0cc7 SymbolDatabase::createSymbolDatabaseFindAllScopes(): hoist _tokenizer->isC(PP) dereference out of loop. 2018-06-02 13:38:15 +02:00
Matthias Krüger e187fdb696 tokenlist::iscast(): save a few pointer dereferences. 2018-06-02 13:19:22 +02:00
Daniel Marjamäki 7163210f72 Fixed #8605 (Segmentation fault below TemplateSimplifier::simplifyCalculations) 2018-06-01 23:03:53 +02:00
orbitcowboy fe8cab1749 Removed platform specifc constants from previous commit. 2018-06-01 12:07:46 +02:00
orbitcowboy 34372aaf00 std.cfg: Added some floating point constants from <math.h>. 2018-06-01 11:45:05 +02:00
Matthias Krüger 26e5c93e37 run dmake 2018-05-31 12:31:03 +02:00
Matthias Krüger be6c273e6b CheckBufferOverrun::checkScope_inner(): save a few pointer derefernces (NFC). 2018-05-31 12:28:34 +02:00
orbitcowboy 55ff7c0823 test std.cfg: Updated tests for strncpy_s(). 2018-05-31 11:23:54 +02:00
Daniel Marjamäki f326021a75 std.cfg: strncpy_s wrongly had <not-uninit/> in first argument 2018-05-31 07:03:07 +02:00
Daniel Marjamäki ccbfd623d5 astyle formatting
[ci skip]
2018-05-31 07:02:08 +02:00
Daniel Marjamäki 02f9ab38b4 simplifyCalculations: Made this function ~30% faster when analysing lib/tokenize.cpp 2018-05-31 06:36:59 +02:00
amai2012 8d55d361ae #8602 Template default parameter without name yields syntax error 2018-05-30 17:09:31 +02:00
orbitcowboy c7993c38b5 bsd.cfg: Added support for strlcat(). 2018-05-30 16:47:00 +02:00
orbitcowboy d412c3908f test std.cfg: Fixed introduced regression. 2018-05-30 16:30:00 +02:00
orbitcowboy 39feb150c0 std.cfg and windows.cfg: Added support for wcscat_s() and _tcscat_s(). 2018-05-30 16:25:09 +02:00
orbitcowboy ef82477d11 std.cfg: Do not take the return value of std::locale::global() into account. 2018-05-30 16:04:40 +02:00
IOBYTE 7681bbf227 Fixed #8146 (false positive: enum initialized using class member initializer syntax in struct in struct) (#1270) 2018-05-30 15:40:16 +02:00
Daniel Marjamäki 4c9bde277a Refactoring: Use ranged for in TemplateSimplifier 2018-05-30 14:40:38 +02:00
Daniel Marjamäki f7148cbaa9 Refactoring: Renamed iterator 2018-05-30 14:33:55 +02:00
orbitcowboy d06eb3eb8f std.cfg: Added support for strcat_s() (since C11). 2018-05-30 14:30:26 +02:00
AlexF 99bb0d975c do not need -d'^I' argument for cut command, it's easy input wrong char for invisible char without copying (#1271) 2018-05-30 12:45:32 +02:00
Konrad Grochowski e1014253ef MISRA Rule 11.6 will no longer report violation on '(void)p;' (#1272) 2018-05-30 12:44:20 +02:00
Daniel Marjamäki cc77a6aa62 Code refactoring 2018-05-29 22:41:37 +02:00