Jim Rees wrote:

Where you have suggested changing

for (side_effects);

with

for (side_effects) { /* empty */ }

I would prefer this:

  for (side_effects)
    ;

I think it will survive re-indentation better, and is a little more
human-readable because it takes up an extra line.

The reason flexelint complains about this sort of thing is that it is a potential bug -- the semicolon in the original may be a typo, or may just be an unfinished statement -- maybe the author is in the habit of typing for (;;); when starting a for statement.

Whether the semi should be elsewhere, or braces should be used,
or whatever, I don't think really matters, the point is to document
that the empty statement is intentional.  Lots of different people will
look at the code over time and have no idea whether it is a bug.

So whatever is done, I think a comment should be added.
--
Joe Buehler


_______________________________________________ OpenAFS-devel mailing list [EMAIL PROTECTED] https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to