* [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
* Re: [PATCH] fstests: solve no-return-in-nonvoid-function issue
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
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2024-04-27 5:52 UTC (permalink / raw)
To: Yong Sun; +Cc: fstests
On Wed, Apr 24, 2024 at 07:24:08PM +0800, Yong Sun wrote:
> --- 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;
This needs to use a tab instead of spaces. Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fstests: solve no-return-in-nonvoid-function issue
2024-04-27 5:52 ` Christoph Hellwig
@ 2024-04-27 8:41 ` Zorro Lang
0 siblings, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2024-04-27 8:41 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Yong Sun, fstests
On Fri, Apr 26, 2024 at 10:52:59PM -0700, Christoph Hellwig wrote:
> On Wed, Apr 24, 2024 at 07:24:08PM +0800, Yong Sun wrote:
> > --- 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;
>
> This needs to use a tab instead of spaces. Otherwise looks good:
Yes, I'll help to change that, thanks!
Reviewed-by: Zorro Lang <zlang@redhat.com>
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
^ permalink raw reply [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.