From a92da3af751202d9e01d809a6a197a0a62362948 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 13 Aug 2006 13:12:55 +0200 Subject: [GCC4] fix warnings in sdla.h and if_frad.h This patch fixes these warnings with gcc 4 : In file included from sdla.c:61: /usr/src/git/linux-2.4/include/linux/if_frad.h:134: warning: 'packed' attribute ignored for field of type 'unsigned char' /usr/src/git/linux-2.4/include/linux/if_frad.h:137: warning: 'packed' attribute ignored for field of type 'unsigned char' /usr/src/git/linux-2.4/include/linux/if_frad.h:139: warning: 'packed' attribute ignored for field of type 'unsigned char' /usr/src/git/linux-2.4/include/linux/if_frad.h:140: warning: 'packed' attribute ignored for field of type 'unsigned char[2u]' In file included from sdla.c:63: /usr/src/git/linux-2.4/include/linux/sdla.h:296: warning: 'packed' attribute ignored for field of type 'char' /usr/src/git/linux-2.4/include/linux/sdla.h:297: warning: 'packed' attribute ignored for field of type 'char' /usr/src/git/linux-2.4/include/linux/sdla.h:299: warning: 'packed' attribute ignored for field of type 'char' /usr/src/git/linux-2.4/include/linux/sdla.h:301: warning: 'packed' attribute ignored for field of type 'char' (...) --- drivers/net/wan/sdla.c | 2 +- include/linux/if_frad.h | 8 ++++---- include/linux/sdla.h | 22 +++++++++++----------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index fe74a21..d0ed22a 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c @@ -319,7 +319,7 @@ static int sdla_cpuspeed(struct net_devi struct _dlci_stat { short dlci __attribute__((packed)); - char flags __attribute__((packed)); + char flags; }; struct _frad_stat diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index e691fdc..c4c2c82 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h @@ -131,13 +131,13 @@ #ifdef __KERNEL__ /* these are the fields of an RFC 1490 header */ struct frhdr { - unsigned char control __attribute__((packed)); + unsigned char control; /* for IP packets, this can be the NLPID */ - unsigned char pad __attribute__((packed)); + unsigned char pad ; - unsigned char NLPID __attribute__((packed)); - unsigned char OUI[3] __attribute__((packed)); + unsigned char NLPID ; + unsigned char OUI[3]; unsigned short PID __attribute__((packed)); #define IP_NLPID pad diff --git a/include/linux/sdla.h b/include/linux/sdla.h index 44ae55b..4a4ea5b 100644 --- a/include/linux/sdla.h +++ b/include/linux/sdla.h @@ -293,23 +293,23 @@ #define SDLA_S508_INTRQ 0x08 #define SDLA_S508_INTEN 0x10 struct sdla_cmd { - char opp_flag __attribute__((packed)); - char cmd __attribute__((packed)); + char opp_flag; + char cmd; short length __attribute__((packed)); - char retval __attribute__((packed)); + char retval; short dlci __attribute__((packed)); - char flags __attribute__((packed)); + char flags; short rxlost_int __attribute__((packed)); long rxlost_app __attribute__((packed)); - char reserve[2] __attribute__((packed)); - char data[SDLA_MAX_DATA] __attribute__((packed)); /* transfer data buffer */ + char reserve[2]; + char data[SDLA_MAX_DATA]; /* transfer data buffer */ }; struct intr_info { - char flags __attribute__((packed)); + char flags; short txlen __attribute__((packed)); - char irq __attribute__((packed)); - char flags2 __attribute__((packed)); + char irq; + char flags2; short timeout __attribute__((packed)); }; @@ -325,10 +325,10 @@ struct buf_info { /* structure pointed to by rse_base in RXBUF_INFO struct */ struct buf_entry { - char opp_flag __attribute__((packed)); + char opp_flag; short length __attribute__((packed)); short dlci __attribute__((packed)); - char flags __attribute__((packed)); + char flags; short timestamp __attribute__((packed)); short reserved[2] __attribute__((packed)); long buf_addr __attribute__((packed)); -- 1.4.2