Thanks, will fix it.


On Tue, May 13, 2014 at 11:04 AM, Edward Welbourne <notifications@github.com
> wrote:

> In libutils/misc_lib.h:
>
> > +#define ProgrammingError(...) __ProgrammingError(__FILE__, __LINE__, __VA_ARGS__)
> > +#define UnexpectedError(...) __UnexpectedError(__FILE__, __LINE__, __VA_ARGS__)
> > +
> > +
> > +#ifndef NDEBUG
> > +
> > +# define CF_ASSERT(condition, ...)                                      \
> > +    do {                                                                \
> > +        if (!(condition))                                               \
> > +            ProgrammingError(__VA_ARGS__);                              \
> > +    } while(0)
> > +
> > +#else
> > +  /* TODO in non-debug builds, this could be UnexpectedError(), but it needs
> > +   * to be rate limited to avoid spamming the console.  */
> > +# define CF_ASSERT() (void)(0)
>
> Good point - not that I'm aware of. I suspect a ... is needed.
> Indeed, experiment confirms this.
>
> #define stupid(...)
> int main(void) {
>     stupid(x, y, pig, fly, elephant);
>     return 0;
> }
>
> compiles just fine, but not without the ...
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cfengine/core/pull/1695/files#r12573568>
> .
>