Skip to contentSkip to conversation

src/af_unix: drop unused offsetof macro definition

PATCH In review Anthony Iliopoulos 2 participants 2 messages Jan 12, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 src/af_unix: drop unused offsetof macro definition

The offsetof macro is causing compiler warnings since it is being redefined, but it is anyway not used, so drop it completely.

---
 src/af_unix.c | 2 --
 1 file changed, 2 deletions(-)
src/af_unix.c +0 -2
index 41037ee4b7ad..89df76586f27 100644
@@ -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;
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Anthony Iliopoulos

The offsetof macro is causing compiler warnings since it is being redefined, but it is anyway not used, so drop it completely.

--D

Quoted 21 lines
---
 src/af_unix.c | 2 --
 1 file changed, 2 deletions(-)
src/af_unix.c +0 -2
index 41037ee4b7ad..89df76586f27 100644
@@ -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;
Signature · 1 line
2.41.0