compile-i386.c: don't ignore return value of write(2)

Some versions of gcc (e.g. v4.8.2) complain about ignoring the return
value of a call to the write(2) system call, since the system header
files have marked its declaration with the warn_unused_result attribute.

In order to suppress the compiler warning, check the return value from
'write' and, if it indicates an error (a negative return value), exit
the process using 'die' to display an error message. Replace a second
call to 'write', which does not provoke a compiler warning, with similar
code for consistency.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Christopher Li <sparse@chrisli.org>
1 file changed