Skip to contentSkip to conversation

ltp/fsx.h: Explicitly use int for return type for aio_rw()

PATCH In review Khem Raj 3 participants 3 messages Nov 5, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 ltp/fsx.h: Explicitly use int for return type for aio_rw()

Fixes build with clang-17+
error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]

---
 ltp/fsx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ltp/fsx.c +1 -1
index ee4b8fe4..c0aec23f 100644
@@ -2581,7 +2581,7 @@ out_error:
 	return -1;
 }
 #else
-aio_rw(int rw, int fd, char *buf, unsigned len, unsigned offset)
+int aio_rw(int rw, int fd, char *buf, unsigned len, unsigned offset)
 {
 	fprintf(stderr, "io_rw: need AIO support!\n");
 	exit(111);
Signature · 1 line
2.42.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Khem Raj

Fixes build with clang-17+
error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]

--D

Quoted 21 lines
---
 ltp/fsx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ltp/fsx.c +1 -1
index ee4b8fe4..c0aec23f 100644
@@ -2581,7 +2581,7 @@ out_error:
 	return -1;
 }
 #else
-aio_rw(int rw, int fd, char *buf, unsigned len, unsigned offset)
+int aio_rw(int rw, int fd, char *buf, unsigned len, unsigned offset)
 {
 	fprintf(stderr, "io_rw: need AIO support!\n");
 	exit(111);
Signature · 1 line
2.42.1
#2 lore raw
In reply to Khem Raj
Quoted 5 lines · Khem Raj

Fixes build with clang-17+
error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]

---

You've fixed this bug with below commit:

commit ab81b565f360218e63d71d33d244edae608f9e7a

Author: Khem Raj <[email protected]>
Date:   Wed Sep 27 15:16:17 2023 +0200

fsx: Add a return type to aio_rw

Please try to rebase to the latest upstream xfstests, and check that.

Thanks,
Zorro

Quoted 20 lines
 ltp/fsx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ltp/fsx.c +1 -1
index ee4b8fe4..c0aec23f 100644
@@ -2581,7 +2581,7 @@ out_error:
 	return -1;
 }
 #else
-aio_rw(int rw, int fd, char *buf, unsigned len, unsigned offset)
+int aio_rw(int rw, int fd, char *buf, unsigned len, unsigned offset)
 {
 	fprintf(stderr, "io_rw: need AIO support!\n");
 	exit(111);
Signature · 1 line
2.42.1