xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Reminder: new 1.2 release coming soon


From: Jens Thoms Toerring
Subject: Re: [XForms] Reminder: new 1.2 release coming soon
Date: Mon, 9 Dec 2013 12:09:05 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi David,

On Mon, Dec 09, 2013 at 08:50:08AM +0000, David Binderman wrote:
> I ran static analyser "cppcheck" over that code. It found lots of things.
> There's this bug for starters
> 
> [xforms-1.0.94pre27/fd2ps/xbmtops.c:132]: (error) Resource leak: fp
> 
> A possible missing call to fclose.
> 
> Then there's all these.
> 
> [xforms-1.0.94pre27/fd2ps/load.c:460]: (warning) scanf without field width 
> limit
> s can crash with huge input data.
> [xforms-1.0.94pre27/fd2ps/load.c:487]: (warning) scanf without field width 
> limit
> s can crash with huge input data.
> [xforms-1.0.94pre27/fd2ps/load.c:544]: (warning) scanf without field width 
> limit
> s can crash with huge input data.
> [xforms-1.0.94pre27/fd2ps/load.c:633]: (warning) scanf without field width 
> limit
> s can crash with huge input data.
> [xforms-1.0.94pre27/fd2ps/load.c:645]: (warning) scanf without field width 
> limit
> s can crash with huge input data.
> 
> where for bullet-proof code, %s should limited to the destination buffer size.
> 
> Then there are minor style issues like this, where some round brackets
> might help.
> 
> [xforms-1.0.94pre27/lib/xyplot.c:3254]: (style) Array index 'i' is used 
> before 
> limits check.
> [xforms-1.0.94pre27/fdesign/fd_groups.c:77]: (style) Boolean result is used 
> in b
> itwise operation. Clarify expression with parentheses.
> [xforms-1.0.94pre27/lib/clock.c:179]: (style) Clarify calculation precedence 
> for
>  '%' and '?'.
> 
> And this selection of possible cut'paste errors.
> 
> [xforms-1.0.94pre27/lib/forms.c:2114] -> 
> [xforms-1.0.94pre27/lib/forms.c:2114]: (style) Same express
> ion on both sides of '||'.
> [xforms-1.0.94pre27/lib/forms.c:2118] -> 
> [xforms-1.0.94pre27/lib/forms.c:2118]: (style) Same express
> ion on both sides of '||'.
> [xforms-1.0.94pre27/lib/forms.c:2264] -> 
> [xforms-1.0.94pre27/lib/forms.c:2264]: (style) Same express
> ion on both sides of '||'.
> [xforms-1.0.94pre27/lib/forms.c:2268] -> 
> [xforms-1.0.94pre27/lib/forms.c:2268]: (style) Same express
> ion on both sides of '||'.
> [xforms-1.0.94pre27/lib/popup.c:2704] -> 
> [xforms-1.0.94pre27/lib/popup.c:2704]: (style) Same express
> ion on both sides of '=='.
> [xforms-1.0.94pre27/lib/popup.c:2710] -> 
> [xforms-1.0.94pre27/lib/popup.c:2710]: (style) Same express
> ion on both sides of '=='.
> 
> There are plenty more other things that cppcheck said, which I can
> supply on request.

Thank you very much for making me aware of the existence of this
tool! I just installed it and am running the tests on the code
base - astonishing how many extra things it finds. And at least
a certain number of them point to stuff that needs more careful
checking and, in some cases, obviously require repairs!

                          Best regards, Jens
-- 
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]