Re: [PATCH] binary-io: always define SET_BINARY as an expression

2009-12-24 Thread Bruno Haible
Eric Blake wrote: > > For me, with -Wall, plain 0 as a statement provokes a warning > > "statement with no effect", but writing (void) 0 suppresses that > > warning. > > Which implies the need for: > > # define SET_BINARY(fd) ((void) 0) Yes, I agree. And when the result type is 'void', it should

Re: [PATCH] binary-io: always define SET_BINARY as an expression

2009-12-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ben Pfaff on 12/24/2009 12:00 PM: > Jim Meyering writes: > >> -# define SET_BINARY(fd) /* nothing */ >> +# define SET_BINARY(fd) 0 > > For me, with -Wall, plain 0 as a statement provokes a warning > "statement with no effect", but writi

Re: [PATCH] binary-io: always define SET_BINARY as an expression

2009-12-24 Thread Ben Pfaff
Jim Meyering writes: > -# define SET_BINARY(fd) /* nothing */ > +# define SET_BINARY(fd) 0 For me, with -Wall, plain 0 as a statement provokes a warning "statement with no effect", but writing (void) 0 suppresses that warning. -- Ben Pfaff http://benpfaff.org

[PATCH] binary-io: always define SET_BINARY as an expression

2009-12-24 Thread Jim Meyering
TCH] binary-io: always define SET_BINARY as an expression * lib/binary-io.h (SET_BINARY): Define to an expression (0), rather than to nothing, on "reasonable" systems. This permits warning-free use like "if (expr) SET_BINARY (fd);". --- ChangeLog |7 +++ lib/b