Commit Graph

23036 Commits

Author SHA1 Message Date
Paul 71c228a01a Check for containers that modify the size using square bracket 2020-08-10 22:07:22 -05:00
Paul a5b0a1c9e2 Evaluate container size in program memory 2020-08-10 20:08:49 -05:00
Paul fec2914700 Add tests for container changes 2020-08-09 22:52:03 -05:00
Paul 26693df788 Use forward analyzer for container forward 2020-08-08 00:10:03 -05:00
Daniel Marjamäki b263b93f73
Merge pull request #2732 from pfultz2/invalid-container-subobj
Fix issue 9780: FP: invalidContainer calling push_back after getting the address of the vector
2020-08-07 09:52:25 +02:00
Paul 56affc9080 Fix issue 9780: FP: invalidContainer calling push_back after getting the address of the vector 2020-08-06 21:08:30 -05:00
Daniel Marjamäki 5372e93964 Fixed #9825 (redundantAssignment: Do not warn about volatile data) 2020-08-06 22:18:25 +02:00
Daniel Marjamäki 4fabd1e059
Merge pull request #2731 from pfultz2/dangling-container-value-type
Fix issue 9770: FP returnDanglingLifetime for class method taking const char* and returning std::string
2020-08-06 09:02:54 +02:00
Paul 0cc1f69862 Fix issue 9770: FP returnDanglingLifetime for class method taking const char* and returning std::string 2020-08-05 23:17:35 -05:00
Daniel Marjamäki 72fa5f2e27 Fixed #9752 (ValueFlow: Uninit after assignment with '&') 2020-08-05 22:57:06 +02:00
Daniel Marjamäki d83757f1a1 astyle formatting 2020-08-05 13:58:06 +02:00
Daniel Marjamäki d5b64d9c3a Clarify inconclusive uninitMemberVar warning in copy constructors, it's in general a good idea to copy all the data. 2020-08-05 13:57:40 +02:00
Daniel Marjamäki 7a85b8e452 Do not ask that calculation is clarified when different order would be invalid 2020-08-05 13:20:18 +02:00
Sebastian 242fc4e9a2
microsoft_unittest.cfg: Add support for Microsoft CppUnitTest library (#2730)
Works for my local project
2020-08-05 12:51:59 +02:00
Daniel Marjamäki 87643ea882
Merge pull request #2727 from jpyllman/fix_simplifypath
fix use simplifyPath() to make sure file name is same as in the checks
2020-08-03 15:31:16 +02:00
Jens Yllman 5ba5916a11 clearer name on the test 2020-08-03 10:30:21 +02:00
Daniel Marjamäki 9693940dad GUI: Try to fix online-help 2020-08-02 21:04:01 +02:00
Daniel Marjamäki 14dfa035c1 GUI: Try to reuse Qt Assistant to show help 2020-08-01 18:56:37 +02:00
Jens Yllman 1cc16deba3 test added to show it works after fix 2020-07-30 22:22:54 +02:00
amai2012 69893fa9bc
Create scriptcheck.yml (#2728)
A github action to run checks on shell and python scripts
2020-07-30 10:37:14 +02:00
amai2012 bab01a84ab
Githubactions update (#2729)
* Use upload-artifact@v2 (not the preview anymore)
* Upload artifacts for CI-unixish
* Use -j$(nproc) for make
2020-07-30 10:36:06 +02:00
Jens Yllman 10ac0bcf54 changed variable name to match guidelines 2020-07-29 12:13:21 +02:00
Jens Yllman 62f5f248be use simplifyPath() to make sure file name is same as in the checks 2020-07-28 22:19:27 +02:00
Frank Zingsheim 686a1bec99 GUI: Add online help (CMake) 2020-07-26 00:22:28 +02:00
Daniel Marjamäki fa32624c93 ValueFlow: Avoid UB in shift when rhs is negative 2020-07-25 14:13:21 +02:00
Daniel Marjamäki fa8c7ed82c buildman: Add github action that builds the manual 2020-07-25 13:04:37 +02:00
Daniel Marjamäki fab3a8efc8
Merge pull request #2721 from KenPatrickLehrmann/compound_assign_bitshift
Add missing operators <<= and >>=
2020-07-25 09:39:32 +02:00
Daniel Marjamäki 6a27580b61
Merge pull request #2725 from skirridsystems/main
Create separate scripts for building HTML and PDF documents
2020-07-25 09:38:07 +02:00
Daniel Marjamäki b4552dedb0 Fix Cppcheck warning 2020-07-24 19:58:36 +02:00
Simon Large ec99be0332 Create separate scripts for building HTML and PDF documents
The PDF build command line is getting very long, and it needs another option. Create separate build scripts for HTML and PDF and just pass in the name of the markdown file.

Adds -V subparagraph to fix a LaTeX error.

Adds fallback font selection to the PDF script.
2020-07-24 18:54:06 +01:00
Daniel Marjamäki 6a839ad511 Fixed #9814 (False positive: functionConst, trailing return type) 2020-07-24 19:40:42 +02:00
orbitcowboy ad8d8ca11d std.cfg: Added support for std::advance. Reference: https://en.cppreference.com/w/cpp/iterator/advance 2020-07-24 10:21:57 +02:00
orbitcowboy bd5492ac43 wxwidgets.cfg: Fixed constants according to bfee44de18 2020-07-24 10:11:12 +02:00
Daniel Marjamäki aec7beb33a win_installer: Add Qt5Sql.dll needed for online help 2020-07-24 09:35:03 +02:00
Paul 46e008c3e2 Fixed #9816 (False positive: Condition '!b' is always false in nested do-while loop) 2020-07-24 08:13:14 +02:00
Daniel Marjamäki aa066755be
Merge pull request #2724 from jubnzv/fix-20-7-string-concat
misra.py: Fix false positives in string concatenation for rule 20.7
2020-07-24 08:06:58 +02:00
Daniel Marjamäki f82207cce6
Merge pull request #2722 from skirridsystems/main
Add GitHub styling to the PDF manual too
2020-07-24 07:48:12 +02:00
Georgy Komarov dc1faa71ed
misra.py: Fix false negatives in string concatenation for rule 20.7
This will fix Trac#9633
2020-07-24 07:15:40 +03:00
Daniel Marjamäki 53e11ead8f Fix Cppcheck warning: unused variable in test 2020-07-23 19:50:41 +02:00
Daniel Marjamäki a11a0e79e4 Fixed Cppcheck internal warning 2020-07-23 18:54:40 +02:00
Simon Large 9ef216b0c5 Update .gitignore
Ignore generated manual files
2020-07-23 15:39:54 +01:00
Simon Large 60362ce8cd Add styling to PDF manual
This uses the xelatex engine and a few style settings to make the PDF manual look more like the HTML manual.
2020-07-23 15:39:23 +01:00
Daniel Marjamäki 1965f2cc9f help: update warning menu screenshot 2020-07-23 16:30:10 +02:00
Daniel Marjamäki f11a089141 help/manual: update explanations about severities 2020-07-23 16:09:24 +02:00
Ken-Patrick LEHRMANN a923115710 Add missing operators <<= and >>=
This fixes issues (at least false positives) in code using them.
For instance:

```
unsigned compute(unsigned long long a) {
    unsigned num = 0;
    while (a > 0xFFFFFFFF) {
      a >>= 32;
      num += 32;
    }
    if (a > 0xFFFF) {
      a >>= 16;
      num += 16;
    }
    if (a > 0xFF) {
      num += 8;
    }
    return num;
}
```

would give false positive:
```
cppcheck --enable=style  sl3.cpp
Checking sl3.cpp ...
sl3.cpp:11:11: style: Condition 'a>0xFF' is always false [knownConditionTrueFalse]
    if (a > 0xFF) {
          ^
sl3.cpp:3:14: note: Assuming that condition 'a>0xFFFFFFFF' is not redundant
    while (a > 0xFFFFFFFF) {
             ^
sl3.cpp:11:11: note: Condition 'a>0xFF' is always false
    if (a > 0xFF) {
          ^
```
2020-07-23 14:36:34 +02:00
Daniel Marjamäki b20128722d win_installer: Add Qt5Help.dll 2020-07-23 11:34:22 +02:00
Daniel Marjamäki 682a6d1c02 Fixed #9017 (Simple classes without side effects not reported as unused) 2020-07-23 11:10:08 +02:00
Daniel Marjamäki 25ad22c6af astyle formatting
[ci skip]
2020-07-23 10:09:06 +02:00
Daniel Marjamäki df99d8aa0a
Merge pull request #2719 from pfultz2/fp-unreachable-alias
Fix issue 9807: False positive: ValueFlow in unreachable code, || lhs is true
2020-07-23 09:52:54 +02:00
Daniel Marjamäki f4a6f8ad07
Merge pull request #2720 from pfultz2/crash-type-scope
Fix crash when typeScope is missing
2020-07-23 09:31:59 +02:00