bug-gnulib
[Top][All Lists]
Advanced

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

Re: Comparing binary files with Diff 3.2 compiled with MinGW


From: Paul Eggert
Subject: Re: Comparing binary files with Diff 3.2 compiled with MinGW
Date: Sun, 13 May 2012 13:20:40 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 05/12/2012 07:00 PM, Bruno Haible wrote:
> +# define set_binary_mode(fd, mode) ((void) (fd), (void) (mode), O_BINARY)

With that approach, code like this:

   set_binary_mode (current->desc, prev_mode);

yields the following undesirable diagnostic:

   io.c:127:8: error: statement with no effect [-Werror=unused-value]

How about something like the following definition instead?
It would also have the advantage of better type-checking on
POSIX hosts.

static int
set_binary_mode (int fd, int mode)
{
  (void) fd;
  (void) mode;
  return O_BINARY;
}



reply via email to

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