+2009-10-27 Jim Meyering <jim@meyering.net>
+ Bruno Haible <bruno@clisp.org>
+
+ Avoid warning despite dropping the return value of fwrite.
+ * lib/unicodeio.c: Include ignore-value.h.
+ (fwrite_success_callback): Explicitly ignore fwrite's return value.
+ * modules/unicodeio (Depends-on): Add ignore-value.
+
2009-10-26 Eric Blake <ebb9@byu.net>
areadlinkat: fix fallback path
/* Unicode character output to streams with locale dependent encoding.
- Copyright (C) 2000-2003, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "localcharset.h"
#include "unistr.h"
+#include "ignore-value.h"
/* When we pass a Unicode character to iconv(), we must pass it in a
suitable encoding. The standardized Unicode encodings are
{
FILE *stream = (FILE *) callback_arg;
- fwrite (buf, 1, buflen, stream);
+ /* The return value of fwrite can be ignored here, because under normal
+ conditions (STREAM is an open stream and not wide-character oriented)
+ when fwrite() returns a value != buflen it also sets STREAM's error
+ indicator. */
+ ignore_value (fwrite (buf, 1, buflen, stream));
return 0;
}