All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fstests: solve no-return-in-nonvoid-function issue
@ 2024-04-24 11:24 Yong Sun
  2024-04-27  5:52 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Yong Sun @ 2024-04-24 11:24 UTC (permalink / raw)
  To: fstests; +Cc: Yong Sun

When build xfstests in some platform it will return
no-return-in-nonvoid-function error in dio-buf-fault.c:83 and
fake-dump-rootino.c:224, add return value to solve the issue.

Signed-off-by: Yong Sun <yosun@suse.com>
---
 src/dio-buf-fault.c     | 2 +-
 src/fake-dump-rootino.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/dio-buf-fault.c b/src/dio-buf-fault.c
index 911c3e1f..6b07c729 100644
--- a/src/dio-buf-fault.c
+++ b/src/dio-buf-fault.c
@@ -79,5 +79,5 @@ int main(int argc, char *argv[]) {
 	c = ((char *)buf)[0];
 	printf("%u\n", c);
 
-	do_dio(argv[2], buf, sz);
+	return do_dio(argv[2], buf, sz);
 }
diff --git a/src/fake-dump-rootino.c b/src/fake-dump-rootino.c
index 8a30dffd..cada223a 100644
--- a/src/fake-dump-rootino.c
+++ b/src/fake-dump-rootino.c
@@ -221,4 +221,5 @@ int main(int argc, char *argv[]) {
 
 	munmap(header, GLOBAL_HDR_SZ);
 	close(fd);
+        return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-27  8:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-24 11:24 [PATCH] fstests: solve no-return-in-nonvoid-function issue Yong Sun
2024-04-27  5:52 ` Christoph Hellwig
2024-04-27  8:41   ` Zorro Lang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.