On Fri, Aug 5, 2011 at 11:51 PM, Uros Bizjak <ubiz...@gmail.com> wrote:

> My system warns during compilation of libiberty test-expandargv.c test:
>
> gcc -DHAVE_CONFIG_H -g -O2 -I..
> -I../../../gcc-svn/trunk/libiberty/testsuite/../../include
> -DHAVE_CONFIG_H -I.. -o test-expandargv \
>        ../../../gcc-svn/trunk/libiberty/testsuite/test-expandargv.c 
> ../libiberty.a
> ../../../gcc-svn/trunk/libiberty/testsuite/test-expandargv.c: In
> function ‘writeout_test’:
> ../../../gcc-svn/trunk/libiberty/testsuite/test-expandargv.c:211:
> warning: ignoring return value of ‘fwrite’, declared with attribute
> warn_unused_result
>
> Attached patch fixes this warning.
>
> 2011-08-05  Uros Bizjak  <ubiz...@gmail.com>
>
>        * testsuite/test-expandargv.c (writeout_test): Check result of fwrite.
>
> Tested on alphaev68-pc-linux-gnu and x86_64-pc-linux-gnu.

I have committed this patch as obvious.  Please also note, that size
and nitems arguments to fwrite were reversed.

Uros.

Reply via email to