bug-gnulib
[Top][All Lists]
Advanced

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

unicodeio.c ignores fwrite return value


From: Jim Meyering
Subject: unicodeio.c ignores fwrite return value
Date: Wed, 12 Nov 2008 11:19:40 +0100

Hi Bruno,

  unicodeio.c: In function 'fwrite_success_callback':
  unicodeio.c:203: warning: ignoring return value of 'fwrite', declared with 
attribute warn_unused_result

Would you be open to a change that would suppress the above warning?
It comes from this:

/* Simple success callback that outputs the converted string.
   The STREAM is passed as callback_arg.  */
long
fwrite_success_callback (const char *buf, size_t buflen, void *callback_arg)
{
  FILE *stream = (FILE *) callback_arg;

  fwrite (buf, 1, buflen, stream);
  return 0;
}

One way would be to use the value and make the function return an
indication of failure.
Alternatively, use ignore_value (from ignore-value.h) to make
explicit the desire to ignore the return value.




reply via email to

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