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
-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
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
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