]> granicus.if.org Git - yasm/commitdiff
avoid 'return value of ftruncate ignored' warnings (#76)
authormostynb <mbmcode@gmail.com>
Sat, 23 Sep 2017 22:14:23 +0000 (00:14 +0200)
committerPeter Johnson <johnson.peter@gmail.com>
Sat, 23 Sep 2017 22:14:23 +0000 (15:14 -0700)
modules/objfmts/bin/bin-objfmt.c

index 69264a90829db359ab640b76ad87235ee9e04c8c..4a4ce96f7840adeb95b4da8a22392bb331279f8e 100644 (file)
@@ -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);