]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
src/af_unix: drop unused offsetof macro definition
authorAnthony Iliopoulos <ailiop@suse.com>
Fri, 12 Jan 2024 13:03:31 +0000 (14:03 +0100)
committerZorro Lang <zlang@kernel.org>
Fri, 9 Feb 2024 05:27:17 +0000 (13:27 +0800)
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>
Signed-off-by: Zorro Lang <zlang@kernel.org>
src/af_unix.c

index 41037ee4b7ad792f3f3ab6b0919a756999fa1cea..89df76586f27faab7bd8ceac40f03ce066cae080 100644 (file)
@@ -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;