Make PACK_STRUCT_FIELD in lwip's cc.h a nop.

The gcc manual states that specifying packed "for struct and union types is equivalent to specifying the packed attribute on each of the structure or union members." lwIP always uses PACK_STRUCT_STRUCT when it uses PACK_STRUCT_FIELD within the struct definition.
上级 4e128e19
#ifdef LWIP
extern "C" {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#include "lwip/tcp_impl.h"
#include "lwip/tcpip.h"
#include "lwip/ip.h"
......@@ -9,7 +7,6 @@ extern "C" {
#include "lwip/dhcp.h"
#include "lwip/sockets.h"
#include "netif/etharp.h"
#pragma GCC diagnostic pop
}
#endif
......
......@@ -21,7 +21,7 @@ typedef s8 s8_t;
typedef uptr mem_ptr_t;
#define PACK_STRUCT_FIELD(x) x __attribute__((packed))
#define PACK_STRUCT_FIELD(x) x
#define PACK_STRUCT_STRUCT __attribute__((packed))
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_END
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论