diff options
author | Jim Meyering <meyering@redhat.com> | 2009-04-30 08:56:08 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-04-30 08:56:08 +0200 |
commit | e05f6890eda248aedea0681a120bf1a05d8bf6ec (patch) | |
tree | 142d40c8ec62ac7533a12d4ad68ea74caed31896 /libidu/idread.c | |
parent | 32a6710eaa68ad464a03dbc09db3883c8984439c (diff) | |
download | idutils-e05f6890eda248aedea0681a120bf1a05d8bf6ec.tar.gz idutils-e05f6890eda248aedea0681a120bf1a05d8bf6ec.tar.bz2 idutils-e05f6890eda248aedea0681a120bf1a05d8bf6ec.zip |
build: suppress warnings about ignored return value from fread/fwrite
* libidu/idwrite.c: include "ignore-value.h".
(io_write): Ignore fwrite return value.
* libidu/idread.c: Likewise for fread.
* bootstrap.conf (gnulib_modules): Add ignore-value.
Diffstat (limited to 'libidu/idread.c')
-rw-r--r-- | libidu/idread.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libidu/idread.c b/libidu/idread.c index 3116a1a..0900743 100644 --- a/libidu/idread.c +++ b/libidu/idread.c @@ -25,10 +25,11 @@ #include <xalloc.h> #include <error.h> -#include "idfile.h" #include "hash.h" -#include "xnls.h" +#include "idfile.h" #include "iduglobal.h" +#include "ignore-value.h" +#include "xnls.h" static int fgets0 (char *buf0, int size, FILE *in_FILE); @@ -192,7 +193,9 @@ io_read (FILE *input_FILE, void *addr, unsigned int size, int io_type) else if (io_type == IO_TYPE_STR) fgets0 (addr, size, input_FILE); else if (io_type == IO_TYPE_FIX) - fread (addr, size, 1, input_FILE); + { + ignore_value (fread (addr, size, 1, input_FILE)); + } else error (0, 0, _("unknown I/O type: %d"), io_type); return size; |