[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9cba6633-b1dc-4cde-b326-609855c6418a@collabora.com>
Date: Mon, 22 Apr 2024 18:49:30 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Amer Al Shanawany <amer.shanawany@...il.com>,
Shuah Khan <shuah@...nel.org>, Christian Brauner <brauner@...nel.org>,
Miklos Szeredi <mszeredi@...hat.com>, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
Javier Carrasco <javier.carrasco.cruz@...il.com>
Subject: Re: [PATCH v2] selftests: filesystems: add missing stddef header
On 4/22/24 6:16 PM, Amer Al Shanawany wrote:
> fix compiler warning and errors when compiling statmount test.
>
> gcc 12.3 (Ubuntu 12.3.0-1ubuntu1~22.04)
>
> statmount_test.c:572:24: warning: implicit declaration of function
> ‘offsetof’ [-Wimplicit-function-declaration]
> 572 | #define str_off(memb) (offsetof(struct statmount, memb) /
> sizeof(uint32_t))
> | ^~~~~~~~
> statmount_test.c:598:51: note: in expansion of macro ‘str_off’
> 598 | test_statmount_string(STATMOUNT_MNT_ROOT,
> str_off(mnt_root), "mount root");
> |
> ^~~~~~~
> statmount_test.c:18:1: note: ‘offsetof’ is defined in header
> ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
> 17 | #include "../../kselftest.h"
> +++ |+#include <stddef.h>
>
> Signed-off-by: Amer Al Shanawany <amer.shanawany@...il.com>
You missed the reviewed-by tag from previous iteration. Putting it here again:
Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> ---
> V1 -> V2 added compiler warning in the patch message
>
> tools/testing/selftests/filesystems/statmount/statmount_test.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/filesystems/statmount/statmount_test.c b/tools/testing/selftests/filesystems/statmount/statmount_test.c
> index 3eafd7da58e2..e6d7c4f1c85b 100644
> --- a/tools/testing/selftests/filesystems/statmount/statmount_test.c
> +++ b/tools/testing/selftests/filesystems/statmount/statmount_test.c
> @@ -3,6 +3,7 @@
> #define _GNU_SOURCE
>
> #include <assert.h>
> +#include <stddef.h>
> #include <stdint.h>
> #include <sched.h>
> #include <fcntl.h>
--
BR,
Muhammad Usama Anjum
Powered by blists - more mailing lists