summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormostynb <mbmcode@gmail.com>2017-09-24 00:14:23 +0200
committerPeter Johnson <johnson.peter@gmail.com>2017-09-23 15:14:23 -0700
commite256985c4929f4e550d8f70cad5fb936f81b7b06 (patch)
treee1b4283aa771e9928874541f8bea439439993783
parent6eac25ff8c63a448fc6b4452a8697f8e0ee7d021 (diff)
downloadyasm-e256985c4929f4e550d8f70cad5fb936f81b7b06.tar.gz
avoid 'return value of ftruncate ignored' warnings (#76)
-rw-r--r--modules/objfmts/bin/bin-objfmt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c
index 69264a90..4a4ce96f 100644
--- a/modules/objfmts/bin/bin-objfmt.c
+++ b/modules/objfmts/bin/bin-objfmt.c
@@ -2040,7 +2040,8 @@ dosexe_objfmt_output(yasm_object *object, FILE *f, /*@unused@*/ int all_syms,
bss_size = tot_size - size;
#ifdef HAVE_FTRUNCATE
if (size != tot_size)
- ftruncate(fileno(f), EXE_HEADER_SIZE + size);
+ if (ftruncate(fileno(f), EXE_HEADER_SIZE + size))
+ ; /* No-op. Report an error? */
#endif
fseek(f, 0, SEEK_SET);