diff mbox series

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

Message ID 20231105082014.1010683-1-raj.khem@gmail.com (mailing list archive)
State New, archived
Headers show
Series ltp/fsx.h: Explicitly use int for return type for aio_rw() | expand

Commit Message

Khem Raj Nov. 5, 2023, 8:20 a.m. UTC
Fixes build with clang-17+
error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ltp/fsx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong Nov. 5, 2023, 4:41 p.m. UTC | #1
On Sun, Nov 05, 2023 at 01:20:14AM -0700, Khem Raj wrote:
> Fixes build with clang-17+
> error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  ltp/fsx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index ee4b8fe4..c0aec23f 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -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);
> -- 
> 2.42.1
> 
>
Zorro Lang Nov. 5, 2023, 6:25 p.m. UTC | #2
On Sun, Nov 05, 2023 at 01:20:14AM -0700, Khem Raj wrote:
> Fixes build with clang-17+
> error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---

You've fixed this bug with below commit:

commit ab81b565f360218e63d71d33d244edae608f9e7a
Author: Khem Raj <raj.khem@gmail.com>
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

>  ltp/fsx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index ee4b8fe4..c0aec23f 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -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);
> -- 
> 2.42.1
> 
>
diff mbox series

Patch

diff --git a/ltp/fsx.c b/ltp/fsx.c
index ee4b8fe4..c0aec23f 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -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);