torrent-file-editor | Qt based GUI tool designed to create and edit .torrent files | File Utils library
kandi X-RAY | torrent-file-editor Summary
kandi X-RAY | torrent-file-editor Summary
Qt based GUI tool designed to create and edit .torrent files. Author: Ivan Romanov <[drizt72@zoho.eu] mailto:drizt72@zoho.eu)> License: GNU General Public License v3.0 or later Homepage: Sources: Crowdin translations:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of torrent-file-editor
torrent-file-editor Key Features
torrent-file-editor Examples and Code Snippets
Community Discussions
Trending Discussions on torrent-file-editor
QUESTION
I use PVS-Studio for my project Torrent File Editor. There is one false positive. Here no real problem but I get such error:
torrent-file-editor/abstracttreenode.h:138: error: V595 The '_parent' pointer was utilized before it was verified against nullptr. Check lines: 138, 139.
Code snippet:
...ANSWER
Answered 2017-Aug-29 at 06:53V595 diagnostic logic is simple. A warning is issued in case if in the beginning a pointer is dereferenced, then is verified for equality to nullptr.
Of course there is a number of situations when the analyzer will be quiet, having met such a pattern. Including a situation when a pointer is not equal to nullptr, so the analyzer will keep quiet.
However, the Q_ASSERT(_parent)
does not guarantee that the pointer _parent
is nonzero. If _parent
is zero, the Q_ASSERT statement will output the following message using the qFatal function. If you are using the default message handler this function will abort to create a core dump.
You can install your own handler, which will continue to run the program. So theoretically the analyzer is right. Potential dereference of a null pointer may occur.
We are not theorists but practics and we realize that this code should be regarded as correct. The analyzer is not familiar with such code view, where the macro Q_ASSERT
is used yet. We will modify the analyzer, so that it begins to perceive such patterns of code as correct. I.e. in the future analyzer will assume that here:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install torrent-file-editor
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page