[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox-cvs
Subject:    [git commit] udhcp: remove struct packing attribute, eliminates gcc-9.x
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2020-10-01 21:49:16
Message-ID: 20201001214157.9724281206 () busybox ! osuosl ! org
[Download RAW message or body]

commit: https://git.busybox.net/busybox/commit/?id=a90a54aead2a082f9bc4d44fd48d1042bcd2c3fb
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

"error: taking address of packed member of 'struct ip_udp_dhcp_packet'
may result in an unaligned pointer value" here:

	udhcp_dump_packet(&packet.data);

and in other places.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
 networking/udhcp/common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index 81c1dcbdc..3cbd2d3c8 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -46,7 +46,7 @@ struct dhcp_packet {
 	uint8_t file[128];    /* boot file name (ASCIZ) */
 	uint32_t cookie;      /* fixed first four option bytes (99,130,83,99 dec) */
 	uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS];
-} PACKED;
+};
 #define DHCP_PKT_SNAME_LEN      64
 #define DHCP_PKT_FILE_LEN      128
 #define DHCP_PKT_SNAME_LEN_STR "64"
@@ -56,12 +56,12 @@ struct ip_udp_dhcp_packet {
 	struct iphdr ip;
 	struct udphdr udp;
 	struct dhcp_packet data;
-} PACKED;
+};
 
 struct udp_dhcp_packet {
 	struct udphdr udp;
 	struct dhcp_packet data;
-} PACKED;
+};
 
 enum {
 	IP_UDP_DHCP_SIZE = sizeof(struct ip_udp_dhcp_packet) - CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS,
_______________________________________________
busybox-cvs mailing list
busybox-cvs@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic