lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] how to fix the worning when compiled with gcc 4.3.0


From: kanprin
Subject: [lwip-users] how to fix the worning when compiled with gcc 4.3.0
Date: Tue, 9 Sep 2008 20:30:32 -0700 (PDT)


tcp.h:214: warning: 'packed' attribute ignored for field of type 'u16_t'  
ect;

the relative code is:
******************************************
PACK_STRUCT_BEGIN
struct tcp_hdr {
  PACK_STRUCT_FIELD(u16_t src);
  PACK_STRUCT_FIELD(u16_t dest);
  PACK_STRUCT_FIELD(u32_t seqno);
  PACK_STRUCT_FIELD(u32_t ackno);
  PACK_STRUCT_FIELD(u16_t _hdrlen_rsvd_flags);
  PACK_STRUCT_FIELD(u16_t wnd);
  PACK_STRUCT_FIELD(u16_t chksum);
  PACK_STRUCT_FIELD(u16_t urgp);
} PACK_STRUCT_STRUCT;
PACK_STRUCT_END
******************************************


 I defined the packed field in cc.h :

******************************************
#define PACK_STRUCT_FIELD(x) x __attribute__((packed))
#define PACK_STRUCT_STRUCT __attribute__((packed))
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_END
******************************************

it works fine with gcc 3.4.0


best regards!


-- 
View this message in context: 
http://www.nabble.com/how-to-fix-the-worning-when-compiled-with-gcc-4.3.0-tp19405718p19405718.html
Sent from the lwip-users mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]