Skip to contentSkip to conversation

userns06_capcheck: Fix build on some distros

PATCH New Cyril Hrubis 1 participant 1 message Apr 26, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 userns06_capcheck: Fix build on some distros

The build fails on some distros because they compile with -Werror=return-type

Fixes f57e28cfb19 ("Rewrite userns06.c using new LTP API")
---
 testcases/kernel/containers/userns/userns06_capcheck.c | 4 ++++
 1 file changed, 4 insertions(+)
testcases/kernel/containers/userns/userns06_capcheck.c +4 -0
index bae4e4e33..c048ef63f 100644
@@ -53,6 +53,8 @@ int main(int argc, char *argv[])
 		tst_res(TFAIL, "unexpected effective/permitted caps at %d", i);
 	else
 		tst_res(TPASS, "expected caps at %d", i);
+
+	return 0;
 }
 
 #else
@@ -61,5 +63,7 @@ int main(void)
 	tst_reinit();
 
 	tst_brk(TCONF, "System is missing libcap");
+
+	return 0;
 }
 #endif
Signature · 5 lines
2.35.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp