]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: solve no-return-in-nonvoid-function issue
authorYong Sun <yosun@suse.com>
Wed, 24 Apr 2024 11:24:08 +0000 (19:24 +0800)
committerZorro Lang <zlang@kernel.org>
Sun, 28 Apr 2024 11:08:22 +0000 (19:08 +0800)
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
src/dio-buf-fault.c
src/fake-dump-rootino.c

index 911c3e1ff98370ccc20ee723cc523209b523db43..6b07c729bedbd6226a35712c97100135fe9bd48c 100644 (file)
@@ -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);
 }
index 8a30dffd177696da4f90fe1fa86335a953460766..a2673b67eb691825cbb1739af739059e4ed60bd1 100644 (file)
@@ -221,4 +221,5 @@ int main(int argc, char *argv[]) {
 
        munmap(header, GLOBAL_HDR_SZ);
        close(fd);
+       return 0;
 }