[SSSD] [PATCH] Fix warning: for loop has empty body

Jakub Hrozek jhrozek at redhat.com
Thu Jan 15 10:26:26 UTC 2015


On Wed, Jan 14, 2015 at 09:46:56PM +0100, Pavel Březina wrote:
> On 01/14/2015 02:24 PM, Lukas Slebodnik wrote:
> >On (12/01/15 13:17), Pavel Březina wrote:
> >>On 01/10/2015 06:08 PM, Lukas Slebodnik wrote:
> >>>ehlo,
> >>>
> >>>The attached patch fixes clang warning -Wempty-body.
> >>>The other alternative is to put put the semicolon on a separate line to silence
> >>>this warning as it was suggested by compiler.
> >>>
> >>>LS
> >>
> >>If we are going to fix this warning, I would prefer this way:
> >>
> >>for (...) {
> >>    /* no op */
> >It is inside of macro but I don't mind.
> >
> >attached is fixed version.
> >
> >LS
> 
> Ack.
> 
> But out of curiosity, there are lots of for cycles with empty body. Why
> those do not trigger this warning?

* master: e2d36e6f735a1f10cb80726a4691f225e66233ed



More information about the sssd-devel mailing list