Hmmm... I don't agree. The Coding Standard encourages empty "while loops": https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#while Why should this not applicable for "for loops"? I think there are many already in the tree.
And why is only "Build / macOS (sim)" complaining? Johannes > -----Original Message----- > From: Nathan Hartman [mailto:hartman.nat...@gmail.com] > Sent: Friday, July 31, 2020 4:15 PM > To: dev@nuttx.apache.org > Subject: [!!Mass Mail]Re: Some questions related PR#1478 > > On Fri, Jul 31, 2020 at 9:46 AM Schock, Johannes - NIVUS GmbH < > johannes.sch...@nivus.com> wrote: > > > Hello, > > I have two questions related PR#1478 ( > > https://github.com/apache/incubator-nuttx/pull/1478): > > > > 1. I think there's a configuration error with "Build / macOS (sim)" since > > it is using -Wempty-body, or is this intentional? > > It gives errors for > > for (namelen = 0; dirinfo->fd_lfname[namelen] != '\0'; namelen++); > > > That's asking for trouble... > > We should probably keep the warning and fix that code to read: > > for (.....) > { > } > > Maybe even put a /* Do nothing */ comment in the body.