Daniel Marjamäki
3ebedcd7f5
Fixed VS crash for torture test
2018-01-26 16:05:43 +01:00
Daniel Marjamäki
a5f202360a
Fixed crash for garbage code, found by fuzzing
2018-01-26 09:34:27 +01:00
Daniel Marjamäki
cb297a00fc
Auto variables: Assign address of local variable to global pointer ( #6825 )
2018-01-25 22:50:41 +01:00
Daniel Marjamäki
9109956c8c
UninitVar: Improve whole program analysis, used isVariableUsage()
2018-01-25 21:49:21 +01:00
Daniel Marjamäki
51c2ded23f
Fix crash
2018-01-25 19:42:50 +01:00
Daniel Marjamäki
4d788a7046
AUTHORS: Added baltth
2018-01-25 17:51:11 +01:00
Daniel Marjamäki
1b3248b0fc
Dont write syntax error for lambda functions
2018-01-25 17:47:27 +01:00
Dmitry Marakasov
596fc32dd7
Don't try to detect Qt if GUI is disabled ( #1057 )
...
Otherwise the build may fail if Qt libraries are installed but qmake is not
2018-01-25 17:33:52 +01:00
Daniel Marjamäki
4d66609173
Fix Cppcheck warning, uninitialized member variable
2018-01-25 17:29:08 +01:00
Daniel Marjamäki
f73da16e94
Revert "UninitVar: Better checking in whole program analysis"
...
This reverts commit b2bdc2687b
.
2018-01-25 17:05:57 +01:00
Daniel Marjamäki
b2bdc2687b
UninitVar: Better checking in whole program analysis
2018-01-25 15:56:46 +01:00
Daniel Marjamäki
c04557eb73
Fix crashes detected with fuzzing
2018-01-25 15:53:58 +01:00
Daniel Marjamäki
ce60b326f4
Whole program analysis: Improved handling of nested calls
2018-01-24 22:53:14 +01:00
Daniel Marjamäki
599e038282
AutoVariables: Warn when address of local array is assigned to global pointer and pointer is not reassigned
2018-01-24 21:33:58 +01:00
IOBYTE
8ce496a127
Fix possible null pointer dereference cppcheck warning. ( #1056 )
2018-01-24 21:19:52 +01:00
Carlos Gomes Martinho
61ef48bcad
[WIP] Package cppcheck as snap app ( #1029 )
...
* added first approach to the snapcraft packaging
* rm opencv stuff
* added Qt5LinguistTools stuff
* fixed building problems
* changed to strict mode
2018-01-24 20:17:16 +01:00
Sebastian
eabe5787ba
Add windows configuration tests ( #1053 )
...
Implemented tests for the following windows configurations (more will
follow):
-Semaphore usage
-lstrcat function configuration
-_countof macro configuration
-Mutex usage
-Library usage (LoadLibrary, GetProcAddress, ...)
2018-01-24 20:05:16 +01:00
Daniel Marjamäki
96e387a486
Fixed #8351 (segmentation fault on objective C code)
2018-01-24 18:06:11 +01:00
Sebastian
6b5805041b
std.cfg: Fixed remaining functions found to be redundant ( #1055 )
...
[std::]strtoimax and [std::]strtoumax:
They were nearly completely duplicates, i removed the ones with
less/missing configuration.
std::basic_string::empty:
It was found to be redundant because very likely someone forgot to
change "empty" to "clear" when copy&pasting the function names. The
empty function in all these clear functions makes no sense, and the
clear function also was missing.
std::queue::empty and std::array:empty:
They were both twice in the same function name list.
std::string::size, std::wstring::size:
They were already configured with many other size functions above.
std::basic_string::size:
This entry was twice in the same function name list directly one after
another. Very likely one of them should be the length function, which
does simply the same but was missing in the std.cfg.
2018-01-24 15:31:55 +01:00
IOBYTE
558e0757c2
Fix simplifyTypedef crash on lambda. ( #1054 )
2018-01-24 15:04:33 +01:00
Daniel Marjamäki
0f561d0ed6
Fix crashes for garbage code, found by fuzzing
2018-01-24 13:53:03 +01:00
IOBYTE
4710d80a40
Fix #5766 (FP: typedef array throws off parser) ( #1052 )
...
* Fix #5766 (FP: typedef array throws off parser)
* Fix travis build.
2018-01-24 09:51:22 +01:00
Sebastian
26ff750848
windows.cfg: Add Mutex function configurations ( #1051 )
2018-01-24 09:50:05 +01:00
Daniel Marjamäki
6e8184f7cc
cert.py: Added test for EXP46
2018-01-23 22:43:29 +01:00
Daniel Marjamäki
ce44a5805c
astyle formatting
...
[ci skip]
2018-01-23 18:15:37 +01:00
Daniel Marjamäki
8eae9cdd60
cert.py: Added testcases for EXP42 and fixed the code a little
2018-01-23 17:18:47 +01:00
Sebastian
d46cd46d0f
windows.cfg: Add _countof macro configuration ( #1047 )
...
By telling cppcheck about the Microsoft Windows _countof() macro it is
now able to detect out of bounds array accesses like this:
wchar_t buf[10];
for(size_t i = 0; i <= (_countof(buf)); ++i) {
buf[i] = L'\0'; // (error) Array 'buf[10]' accessed at index 10, which
is out of bounds.
}
2018-01-23 15:45:06 +01:00
Sebastian
402807b3b0
daca2.py Minor fix: fomat string argument (found by Codacity) ( #1037 )
...
* daca2.py Minor fix: fomat string argument (found by Codacity)
* daca2.py: Change print call to logging.critical call
2018-01-23 13:05:07 +01:00
amai2012
bddea350d3
Ignore generated files from man/ subfolder
2018-01-23 11:39:19 +01:00
amai2012
fcbe88ad2f
Move test files to subfolder
2018-01-23 11:33:13 +01:00
Sebastian
a4deca3c98
posix.cfg: Remove redundant entries ( #1049 )
...
I carefully removed the duplicate/redundant entries with less/missing
configuration, so no information is lost.
2018-01-22 17:21:07 +01:00
Sebastian
4dbeffd615
std.cfg: Fix redundant function names ( #1050 )
...
This fixes some more redundant function configurations. Seems like they
are the result of copy & paste errors.
2018-01-22 17:18:36 +01:00
Sebastian
b78d714037
posix.cfg: access(): Removed redundant configuration, added tests ( #1048 )
...
I intentionally removed the second access() configuraion because it was
missing the use-retval attribute. But calling access() without using the
return value is absolutely senseless.
I added tests to posix.c to verify the correct configuration of
access().
2018-01-22 14:54:14 +01:00
IOBYTE
e6d285d3ca
Fixed #8357 (crash: cmake Tests/CMakeLib/testUTF8.cxx --debug --verbose) ( #1046 )
2018-01-22 08:06:56 +01:00
Daniel Marjamäki
512b9f512c
Refactoring whole program analysis for CheckUninitVar and CheckNullPointer
2018-01-21 22:56:46 +01:00
IOBYTE
3159d151d3
Fix symbol database crash on template type aliases by ignoring them. ( #1045 )
2018-01-21 21:22:26 +01:00
Daniel Marjamäki
351b382a7b
Null pointers: Whole program analysis
2018-01-21 19:51:15 +01:00
orbitcowboy
5b145c3ef6
Merge pull request #1044 from orbitcowboy/master
...
tokenize: simplify empty string creation string("")->string().
2018-01-21 18:23:18 +01:00
Daniel Marjamäki
28a44e25bc
Manual: Added a chapter about misra
2018-01-21 16:43:47 +01:00
Daniel Marjamäki
84fda14684
GUI: cleanup settings dialog interface
2018-01-21 16:42:46 +01:00
Martin Ettl
17a54681b8
tokenize: simplify empty string creation string("")->string().
2018-01-21 16:36:57 +01:00
Alexey Eryomenko
913fdf44b6
member access operators are allowed inside the embedded SQL block when ( #1043 )
...
passing arguments for a query
2018-01-21 15:58:12 +01:00
PKEuS
2b3def6be1
Windows Installer: Added missing addons and cfgs
2018-01-21 12:19:38 +01:00
Daniel Marjamäki
ea63e52d98
UninitVar: Improved function/method matching in whole program analysis
2018-01-21 10:40:35 +01:00
Daniel Marjamäki
55b3004000
misra.py: minor tweaks
2018-01-21 10:39:18 +01:00
IOBYTE
5673348215
Fixed #8350 (False positive: enum class static_cast to int is treated as non-primitive when type inference is used) ( #1042 )
2018-01-21 07:26:37 +01:00
orbitcowboy
ec0cc4e29c
templatesimplifier: Removed redundant local string variable. ( #1041 )
2018-01-20 22:26:48 +01:00
orbitcowboy
bf201328d1
Merge pull request #1039 from orbitcowboy/master
...
checkstring: Cleanup not needed variable.
2018-01-20 14:59:01 +01:00
Simon Martin
b4f32206af
Ticket #8337 : Fix false positive in copy constructor detection. ( #1040 )
2018-01-20 14:46:09 +01:00
Daniel Marjamäki
6f2d4361df
Misra: Integration of MISRA in the GUI. The misra addon can now extract the rule texts from the PDF.
2018-01-20 14:13:09 +01:00