* [PATCH] src/af_unix: drop unused offsetof macro definition
@ 2024-01-12 13:03 Anthony Iliopoulos
2024-01-12 17:00 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Anthony Iliopoulos @ 2024-01-12 13:03 UTC (permalink / raw)
To: fstests
The offsetof macro is causing compiler warnings since it is being
redefined, but it is anyway not used, so drop it completely.
Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
---
src/af_unix.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/af_unix.c b/src/af_unix.c
index 41037ee4b7ad..89df76586f27 100644
--- a/src/af_unix.c
+++ b/src/af_unix.c
@@ -17,8 +17,6 @@
#include <sys/socket.h>
#include <sys/un.h>
-#define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER)
-
int main(int argc, char *argv[])
{
struct sockaddr_un sun;
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] src/af_unix: drop unused offsetof macro definition
2024-01-12 13:03 [PATCH] src/af_unix: drop unused offsetof macro definition Anthony Iliopoulos
@ 2024-01-12 17:00 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2024-01-12 17:00 UTC (permalink / raw)
To: Anthony Iliopoulos; +Cc: fstests
On Fri, Jan 12, 2024 at 02:03:31PM +0100, Anthony Iliopoulos wrote:
> The offsetof macro is causing compiler warnings since it is being
> redefined, but it is anyway not used, so drop it completely.
>
> Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> src/af_unix.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/src/af_unix.c b/src/af_unix.c
> index 41037ee4b7ad..89df76586f27 100644
> --- a/src/af_unix.c
> +++ b/src/af_unix.c
> @@ -17,8 +17,6 @@
> #include <sys/socket.h>
> #include <sys/un.h>
>
> -#define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER)
> -
> int main(int argc, char *argv[])
> {
> struct sockaddr_un sun;
> --
> 2.41.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-12 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-12 13:03 [PATCH] src/af_unix: drop unused offsetof macro definition Anthony Iliopoulos
2024-01-12 17:00 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox