Suspicious code in kdelibs/kdebase revision 864329

Jason Stubbs jasonbstubbs at gmail.com
Thu Sep 25 02:38:27 BST 2008


On Thu, Sep 25, 2008 at 8:00 AM, Aaron J. Seigo <aseigo at kde.org> wrote:

> > - kdelibs/kdeui/widgets/ktoolbar.cpp:1056
> >
> > This loop is executed at most once. Not forever.
>
> false positive; not the most obvious bit of code, perhaps, but it's using
> the
> forever as a way to utilize break; statements as prettier gotos
>

Personal preference, I guess, but I generally use do { } while (false); for
these cases to be explicit that it is not a real loop.

--
Jason Stubbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080925/5b3f2c58/attachment.htm>


More information about the kde-core-devel mailing list