Re: cppcheck on Dillo source

Nick Warne <nick-ucsffw2X/[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
On Sat, 9 Jul 2016 12:35:10 +0100
Nick Warne <nick-ucsffw2X/[email protected]> wrote:

> Hi all,
> 
> While waiting for the Tour De France to start on TV, I ran cppcheck on
> Dillo source for something to do - a few errors were picked up!
> 
> I have compacted the findings (with two comments from me)and attached
> it as a plain text file.
> 
> Keep up the great work guys and thanks!
> 
> Nick

OK, updating cppcheck to 1.74, I ran it again.  A new error appears, but
I don't know if it is a false positive, as I still don't really
understand C++ (but do get the logic of function calls vs void etc.:

Checking ../../slackbuilds/dillo/hg/dillo/src/ui.cc...
[../../slackbuilds/dillo/hg/dillo/src/ui.cc:574]: (error) Return value
of allocation function 'make_filemenu_button' is not stored.
[../../slackbuilds/dillo/hg/dillo/src/ui.cc:588]: (error) Return value
of allocation function 'make_filemenu_button' is not stored.

Now, the call is:

make_filemenu_button();

to:

Fl_Widget *UI::make_filemenu_button()

which returns (btn)

so is that correct?  Where does (btn) go in the calling function - or
what does it do?

Nick (trying to learn).
-- 
Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
		-- Doctor Who "Androids of Tara"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.