From bfb33f2f46a40023aa9820f4cdd99281e41250c1 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 25 Nov 2016 18:30:41 +0100 Subject: common: Fix 'unchecked return code' warnings Several tools are simply not checking return code of functions marked with 'warn_unused_result'. Provide wrappers for the read/write functions to avoid patching old code and providing proper error handling. Fix the remaining ones (calls to fgets() and system()). Signed-off-by: Boris Brezillon --- jffsX-utils/jffs2reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jffsX-utils/jffs2reader.c') diff --git a/jffsX-utils/jffs2reader.c b/jffsX-utils/jffs2reader.c index 09d1d89..16870ba 100644 --- a/jffsX-utils/jffs2reader.c +++ b/jffsX-utils/jffs2reader.c @@ -859,7 +859,7 @@ void catfile(char *o, size_t size, char *path, char *b, size_t bsize, ri = find_raw_inode(o, size, ino); putblock(b, bsize, rsize, ri); - write(1, b, *rsize); + write_nocheck(1, b, *rsize); } /* usage example */ -- cgit v1.2.3