bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] chdir-long: avoid -Werror=unused-variable with -DNDEBUG


From: Norihiro Tanaka
Subject: Re: [PATCH] chdir-long: avoid -Werror=unused-variable with -DNDEBUG
Date: Sun, 21 Dec 2014 10:14:16 +0900

On Sat, 20 Dec 2014 13:03:23 -0800
Paul Eggert <address@hidden> wrote:

> Norihiro Tanaka wrote:
> > +#if NDEBUG
> > +      close (cdb->fd);
> > +#else
> >         bool close_fail = close (cdb->fd);
> >         assert (! close_fail);
> > +#endif
> 
> That sort of thing looks like it'd be reasonably annoying in the long
> run.  How about the attached patch instead?

Thanks, it works fine, and it is elegant.  However, how about "gl_assert"
instead of "assure"?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]