From 47f6b1305cc3752f318a555b932e194e1500c1d8 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Wed, 25 Mar 2015 16:42:57 +0000 Subject: 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 Signed-off-by: Thomas Wood --- tests/prime_udl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/prime_udl.c') diff --git a/tests/prime_udl.c b/tests/prime_udl.c index 62b381a3..d03aee06 100644 --- a/tests/prime_udl.c +++ b/tests/prime_udl.c @@ -61,7 +61,7 @@ static int find_and_open_devices(void) if (!fl) break; - fgets(vendor_id, 8, fl); + igt_assert_neq(fgets(vendor_id, 8, fl), NULL); fclose(fl); venid = strtoul(vendor_id, NULL, 16); -- cgit v1.2.3