Message ID | 20240112130331.4079-1-ailiop@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | src/af_unix: drop unused offsetof macro definition | expand |
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 > >
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;
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(-)