Commit Graph

18875 Commits

Author SHA1 Message Date
Daniel Marjamäki a5af5b2d08 Revert "Fixed #7619 (False positive: Redundant assignment)"
There is a crash I need to look into.
2018-11-20 06:23:43 +01:00
Daniel Marjamäki 399fef17ca Add script pr.py to merge pull requests. runastyle is executed automatically. 2018-11-20 06:20:46 +01:00
Daniel Marjamäki c899792232 Fixed #7619 (False positive: Redundant assignment) 2018-11-19 21:23:36 +01:00
yurii.putin 2aecd30cd8 Change cfg
Add some function (posix_memalign, reallocarray,aligned_alloc,valloc) to cfg. Add attribute format-str to some function.
2018-11-19 18:23:00 +01:00
Daniel Marjamäki 340964cd65 Travis: updated the .travis_llvmcheck_suppressions file, * is not allowed 2018-11-19 15:42:40 +01:00
Daniel Marjamäki c91e1fad1e Travis: Suppress various warnings when checking clang/llvm 2018-11-19 15:16:02 +01:00
Daniel Marjamäki 1fd7ea91e0 Revert "travis: reduce log output when checking clang"
This reverts commit 8efa405552.
2018-11-19 15:11:59 +01:00
Daniel Marjamäki 8efa405552 travis: reduce log output when checking clang 2018-11-19 14:29:12 +01:00
Daniel Marjamäki 347c46491a donate-cpu-server: try to handle uploaded crash results better 2018-11-19 10:57:04 +01:00
Daniel Marjamäki f5c2abaefa Fix shadow warning 2018-11-19 10:21:02 +01:00
Daniel Marjamäki 4d8a85ec4d donate-cpu: add --package argument 2018-11-19 10:04:53 +01:00
Daniel Marjamäki 42e516582c Disable shadow warnings when compiling 2018-11-19 09:25:59 +01:00
Daniel Marjamäki a8cbbe0e16 Fixed #8816 (FP shadowLocal - variable shadows a template function?) 2018-11-19 07:00:15 +01:00
Daniel Marjamäki 9ef3c79bc6 Fixed #8851 (Crash in valueFlowContainerForward (daca@home: pbbam)) 2018-11-18 20:18:55 +01:00
Daniel Marjamäki 5eddcb0827 donate-cpu: use --template=daca2 so we can see some more details in the warnings 2018-11-18 16:26:56 +01:00
Daniel Marjamäki f2b26a488a relative paths: another fix for {code} 2018-11-18 16:15:09 +01:00
Daniel Marjamäki 982f7dc2b3 relative paths: show {code} properly when there are relative paths 2018-11-18 16:08:08 +01:00
Daniel Marjamäki e8ac45a5a7 donate-cpu-server.py: Recheck crashes more frequently 2018-11-17 19:32:10 +01:00
amai2012 6b05f8e867 Don't echo file names being extracted from archive 2018-11-17 18:29:12 +01:00
Paul Fultz II 7ef119cbfc Fix FPs in lifetime checker
This fixes several FPs in the lifetime checker. It also fixes issue [8846](https://trac.cppcheck.net/ticket/8846):

```cpp
int * f(int a[])
{
        return a;
}
```
2018-11-17 09:41:59 +01:00
Carlo Marcelo Arenas Belón 8e465d5963 runastyle
several improvements to help with users that have a development workstation without a native version of astyle with the expected version

patch 2 is the most important and less intrusive change towards that objective but the whole series completes the feature, including parts of patch 4 that will allow for example users with spaces on their username to point to a binary no their home directories.

I decided against splitting the changes on 2 patches for simplicity and because I was expecting the whole series might be squashed for merging anyway
2018-11-17 09:29:24 +01:00
Paul Fultz II d376e9f245 Track variable lifetime through function calls (#1481) 2018-11-16 06:12:28 +01:00
Carlo Marcelo Arenas Belon d880d64a9c test: avoid a mutable comparator for test (#1482) 2018-11-15 16:21:12 +01:00
Daniel Marjamäki d95d884bba donate-cpu: try to handle socket error better when getting package 2018-11-14 21:41:16 +01:00
Daniel Marjamäki 5d086d60ad Fixed #8844 (snd: Wrong varid and ast) 2018-11-14 21:05:09 +01:00
Daniel Marjamäki 69f2e0938a VarId: Improved varids for struct members (#8844) 2018-11-14 19:11:35 +01:00
Daniel Marjamäki 39c04b650d astyle formatting
[ci skip]
2018-11-14 19:10:52 +01:00
Daniel Marjamäki 69f6100d83 Fixed #8339 (false positive: unread variable despite delete is used on it) 2018-11-14 17:04:21 +01:00
amai2012 f1ce40a918 Update Makefile 2018-11-14 09:01:08 +01:00
Paul Fultz II 54453c5802 Fix FP when copying pointer to string (#1479) 2018-11-14 06:59:25 +01:00
Daniel Marjamäki ac242b69d6 Refactoring: Use range for loops 2018-11-14 06:58:21 +01:00
Paul Fultz II f0c86b9d14 Fix issue 8842: Crash in valueFlowTerminatingCondition on incomplete code (#1480) 2018-11-14 06:23:45 +01:00
Paul Fultz II e839001f3d Fix warnings (#1478) 2018-11-14 06:14:04 +01:00
Daniel Marjamäki d97851b9db change severity for 'unknown macro' to error for now. 2018-11-13 21:08:45 +01:00
Daniel Marjamäki 152be6df63 Report 'unknown macro' as information message with id unknownMacro 2018-11-13 20:14:56 +01:00
Daniel Marjamäki a50eb56d8d Extend 'Unknown macro' check 2018-11-13 18:30:40 +01:00
Daniel Marjamäki e6a5e0f752 Warn when there is a unknown macro 2018-11-13 16:49:15 +01:00
Daniel Marjamäki 69e7392ce2 Fixed #8449 (False positive 'constStatement' when initializing std::unordered_map) 2018-11-12 18:10:34 +01:00
Daniel Marjamäki 2d61ca8883 donate-cpu: try to handle OSError when unpacking a tar file 2018-11-12 14:45:39 +01:00
Daniel Marjamäki 3d629944da Fixed #8100 (False positive when method/function defines lambda with pointer return value) 2018-11-12 11:28:38 +01:00
Daniel Marjamäki f096d7f474 astyle formatting
[ci skip]
2018-11-12 10:08:57 +01:00
Paul Fultz II 0e11bb07c8 Extend lifetime analysis to pointer usage (#1477)
* Use lifetime analysis for pointers as well

* Fix issue 1143: Pointer to local array

* Update message when using pointers

* Avoid infinite loop in tracing lifetimes
2018-11-12 10:08:17 +01:00
Daniel Marjamäki 717a2d370c astyle formatting
[ci skip]
2018-11-12 06:32:02 +01:00
Daniel Marjamäki 58882b1f14 Fixed #8261 (False positive "Statements following return, break, continue, goto or throw will never be executed.") 2018-11-12 06:31:17 +01:00
Paul Fultz II 5bda102897 Fix warnings (#1476) 2018-11-12 06:08:57 +01:00
Paul Fultz II 68d6b96878 Diagnose invalid lifetimes (#1475)
* Add check for invalid lifetimes

* Fix FP with member variables

* Dont forward lifetime values in subfunction

* Update message to use out of scope
2018-11-11 16:43:54 +01:00
Daniel Marjamäki bdd4623124 valueFlowLibraryFunction: fix crash found with daca@home 2018-11-11 16:41:01 +01:00
Daniel Marjamäki 3f55707b30 Fixed #8064 (Taking the address of a moved variable is not accessing it) 2018-11-11 12:47:27 +01:00
Paul Fultz II e46691597e Fix issue 8841: FP knownConditionTrueFalse - Dont treat unknown function as noreturn (#1474)
* Fix issue 8841: Dont treat unknown function as noreturn

* Add a parameter to set default value when the function is unknown
2018-11-11 08:04:01 +01:00
Daniel Marjamäki ee2dfb6604 Fixed #8058 (False positive returnAddressOfAutoVariable within lambda) 2018-11-11 07:52:38 +01:00