fstests: solve no-return-in-nonvoid-function issue
PATCH 1/1 fstests: solve no-return-in-nonvoid-function issue
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 <[email protected]>
--- src/dio-buf-fault.c | 2 +- src/fake-dump-rootino.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
src/dio-buf-fault.c +1 -1
@@ -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); }
src/fake-dump-rootino.c +1 -0
@@ -221,4 +221,5 @@ int main(int argc, char *argv[]) {munmap (header,GLOBAL_HDR_SZ );close (fd); +return 0 ; }
Signature · 1 line
2.43.0
src/fake-dump-rootino.c int main(int argc, char *argv[]) { · line 224
Quoted 7 lines · Yong Sun
src/fake-dump-rootino.c +1
-0@@ -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 <[email protected]>
Zorro Lang
Reviewed-byQuoted 10 lines · Christoph Hellwig
src/fake-dump-rootino.c int main(int argc, char *argv[]) { · line 224
Quoted 7 lines · Yong Sun
src/fake-dump-rootino.c +1
-0@@ -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 <[email protected]>
Quoted 3 lines
Reviewed-by Christoph Hellwig <[email protected]>