On 08/30/2010 08:29 AM, Bruce Korb wrote:
Every now and then, I'm thumped on the head by something fairly silly.
This warning is quite silly:
(void)fwrite(...)
Gnulib has the ignore-value module for places where casting to void is
insufficient to shut up gcc.
Therefore, I suggest two families of gnulib wrapper functions:
xSTDIOFN()
ySTDIOFN()
wherein ``xfwrite()'' would die if fwrite() fails (explicitly without
the fflush() check),
and ``yfwrite()'' will ensure no compiler squawks about not checking results.
If this is considered "okay", I'll supply a patch.
I might see using the xfwrite() variant (we already have xfprintf as a
gnulib module), but not the yfwrite variant (I would use
ignore_value(fwrite) in that case).
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org