On Mon, Oct 17, 2016 at 02:28 +0200, Uwe Hermann wrote:
> 
> Hi,
> 
> On Sun, Oct 16, 2016 at 06:25:18PM +0200, Gerhard Sittig wrote:
> > Signed-off-by: Gerhard Sittig <gerhard.sit...@gmx.net>
> 
> Merged, thanks!
> 
> 
> >     while (sigma_read(&pins, 1, devc) == 1)
> > -           ;
> > +           /* EMPTY */;
> 
> Dropped this hunk though, that's pretty idiomatic IMHO, a comment is not
> really necessary there.

Some tools are said to pick up those comments (EMPTY, UNREACH,
FALLTHROUGH, maybe others).  So they can help both human readers
and static checkers alike (lint/splint?).

But I agree that this is minor, and developers recognize the
idiom without the comment, of course.

Occasionally I've seen compilers emit warnings in the absence of
comments, asking whether the resulting source is unintended.  So
I made a habit of adding the comments.  Preference mostly depends
on how often you got bitten by missing or unwanted extra
semicolons for sure.


virtually yours
Gerhard Sittig
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to