igt.cocci: check the return values of various functions

Add rules to fix unused-result warnings when compiling with
_FORTIFY_SOURCE defined and apply them to the library and tests.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Thomas Wood
2015-03-25 16:42:57 +00:00
parent 0c4dd28d2d
commit 47f6b1305c
11 changed files with 58 additions and 29 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ static void query(int fd, bool busy)
busy ? "busy" : "idle", elapsed(&start, &end, count));
if (busy)
read(fd, buf, sizeof(buf));
igt_assert_eq(read(fd, buf, sizeof(buf)), sizeof(buf));
}
igt_main