From 993c9e7a6a005b9f59ce7343e966b4db18c74370 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 15 Sep 2007 13:18:40 +0000 Subject: [PATCH] Silence gcc 4.1's "packed attribute ignored..." warnings. No differences in object files. Taken-from: FreeBSD --- sys/dev/raid/ciss/cissio.h | 14 +-- sys/dev/video/fb/bmp/splash_bmp.c | 60 +++++------ sys/netproto/ncp/ncp.h | 198 ++++++++++++++++++------------------ sys/platform/pc32/include/pc/vesa.h | 24 ++--- 4 files changed, 148 insertions(+), 148 deletions(-) diff --git a/sys/dev/raid/ciss/cissio.h b/sys/dev/raid/ciss/cissio.h index b75e3abc1f..1aba2cebca 100644 --- a/sys/dev/raid/ciss/cissio.h +++ b/sys/dev/raid/ciss/cissio.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ciss/cissio.h,v 1.1.2.1 2001/12/12 06:38:16 ps Exp $ - * $DragonFly: src/sys/dev/raid/ciss/cissio.h,v 1.3 2005/02/12 00:23:02 joerg Exp $ + * $DragonFly: src/sys/dev/raid/ciss/cissio.h,v 1.4 2007/09/15 13:18:40 swildner Exp $ */ /* @@ -109,18 +109,18 @@ typedef union { u_int8_t Dev; u_int8_t Bus:6; u_int8_t Mode:2; - } PeripDev __attribute__ ((__packed__)); + } __packed PeripDev; struct { u_int8_t DevLSB; u_int8_t DevMSB:6; u_int8_t Mode:2; - } LogDev __attribute__ ((__packed__)); + } __packed LogDev; struct { u_int8_t Dev:5; u_int8_t Bus:3; u_int8_t Targ:6; u_int8_t Mode:2; - } LogUnit __attribute__ ((__packed__)); + } __packed LogUnit; } SCSI3Addr_struct; typedef struct { @@ -149,7 +149,7 @@ typedef struct { u_int8_t Type:3; u_int8_t Attribute:3; u_int8_t Direction:2; - } Type __attribute__ ((__packed__)); + } __packed Type; u_int16_t Timeout; u_int8_t CDB[16]; } RequestBlock_struct; @@ -159,13 +159,13 @@ typedef union { u_int8_t Reserved[3]; u_int8_t Type; u_int32_t ErrorInfo; - } Common_Info __attribute__ ((__packed__)); + } __packed Common_Info; struct { u_int8_t Reserved[2]; u_int8_t offense_size; u_int8_t offense_num; u_int32_t offense_value; - } Invalid_Cmd __attribute__ ((__packed__)); + } __packed Invalid_Cmd; } MoreErrInfo_struct; typedef struct { diff --git a/sys/dev/video/fb/bmp/splash_bmp.c b/sys/dev/video/fb/bmp/splash_bmp.c index 951fff6bda..91443b761b 100644 --- a/sys/dev/video/fb/bmp/splash_bmp.c +++ b/sys/dev/video/fb/bmp/splash_bmp.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/modules/splash/bmp/splash_bmp.c,v 1.10.2.3 2000/10/31 08:00:06 nyan Exp $ - * $DragonFly: src/sys/dev/video/fb/bmp/splash_bmp.c,v 1.9 2006/12/22 23:26:27 swildner Exp $ + * $DragonFly: src/sys/dev/video/fb/bmp/splash_bmp.c,v 1.10 2007/09/15 13:18:40 swildner Exp $ */ #include @@ -167,44 +167,44 @@ bmp_splash(video_adapter_t *adp, int on) */ typedef struct tagBITMAPFILEHEADER { /* bmfh */ - u_short bfType __attribute__ ((packed)); - int bfSize __attribute__ ((packed)); - u_short bfReserved1 __attribute__ ((packed)); - u_short bfReserved2 __attribute__ ((packed)); - int bfOffBits __attribute__ ((packed)); -} BITMAPFILEHEADER; + u_short bfType; + int bfSize; + u_short bfReserved1; + u_short bfReserved2; + int bfOffBits; +} __packed BITMAPFILEHEADER; typedef struct tagBITMAPINFOHEADER { /* bmih */ - int biSize __attribute__ ((packed)); - int biWidth __attribute__ ((packed)); - int biHeight __attribute__ ((packed)); - short biPlanes __attribute__ ((packed)); - short biBitCount __attribute__ ((packed)); - int biCompression __attribute__ ((packed)); - int biSizeImage __attribute__ ((packed)); - int biXPelsPerMeter __attribute__ ((packed)); - int biYPelsPerMeter __attribute__ ((packed)); - int biClrUsed __attribute__ ((packed)); - int biClrImportant __attribute__ ((packed)); -} BITMAPINFOHEADER; + int biSize; + int biWidth; + int biHeight; + short biPlanes; + short biBitCount; + int biCompression; + int biSizeImage; + int biXPelsPerMeter; + int biYPelsPerMeter; + int biClrUsed; + int biClrImportant; +} __packed BITMAPINFOHEADER; typedef struct tagRGBQUAD { /* rgbq */ - u_char rgbBlue __attribute__ ((packed)); - u_char rgbGreen __attribute__ ((packed)); - u_char rgbRed __attribute__ ((packed)); - u_char rgbReserved __attribute__ ((packed)); -} RGBQUAD; + u_char rgbBlue; + u_char rgbGreen; + u_char rgbRed; + u_char rgbReserved; +} __packed RGBQUAD; typedef struct tagBITMAPINFO { /* bmi */ - BITMAPINFOHEADER bmiHeader __attribute__ ((packed)); - RGBQUAD bmiColors[256] __attribute__ ((packed)); -} BITMAPINFO; + BITMAPINFOHEADER bmiHeader; + RGBQUAD bmiColors[256]; +} __packed BITMAPINFO; typedef struct tagBITMAPF { - BITMAPFILEHEADER bmfh __attribute__ ((packed)); - BITMAPINFO bmfi __attribute__ ((packed)); -} BITMAPF; + BITMAPFILEHEADER bmfh; + BITMAPINFO bmfi; +} __packed BITMAPF; #define BI_RGB 0 #define BI_RLE8 1 diff --git a/sys/netproto/ncp/ncp.h b/sys/netproto/ncp/ncp.h index ae73e68f8c..a716ebd94c 100644 --- a/sys/netproto/ncp/ncp.h +++ b/sys/netproto/ncp/ncp.h @@ -5,7 +5,7 @@ * New version derived from original ncp.h, 1998 Boris Popov * * $FreeBSD: src/sys/netncp/ncp.h,v 1.3 1999/12/12 05:50:03 bp Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp.h,v 1.2 2003/06/17 04:28:53 dillon Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp.h,v 1.3 2007/09/15 13:18:40 swildner Exp $ */ #ifndef _NETNCP_NCP_H_ @@ -67,7 +67,7 @@ struct ncp_fh_s { u_int32_t val32; u_int16_t val16; } val; -} __attribute__((packed)); +} __packed; typedef struct ncp_fh_s ncp_fh; @@ -113,28 +113,28 @@ struct ncp_file_info { }; struct nw_queue_job_entry { - u_int16_t InUse __attribute__((packed)); - u_int32_t prev __attribute__((packed)); - u_int32_t next __attribute__((packed)); - u_int32_t ClientStation __attribute__((packed)); - u_int32_t ClientTask __attribute__((packed)); - u_int32_t ClientObjectID __attribute__((packed)); - u_int32_t TargetServerID __attribute__((packed)); - u_int8_t TargetExecTime[6] __attribute__((packed)); - u_int8_t JobEntryTime[6] __attribute__((packed)); - u_int32_t JobNumber __attribute__((packed)); - u_int16_t JobType __attribute__((packed)); - u_int16_t JobPosition __attribute__((packed)); - u_int16_t JobControlFlags __attribute__((packed)); - u_int8_t FileNameLen __attribute__((packed)); - char JobFileName[13] __attribute__((packed)); - u_int32_t JobFileHandle __attribute__((packed)); - u_int32_t ServerStation __attribute__((packed)); - u_int32_t ServerTaskNumber __attribute__((packed)); - u_int32_t ServerObjectID __attribute__((packed)); - char JobTextDescription[50] __attribute__((packed)); - char ClientRecordArea[152] __attribute__((packed)); -}; + u_int16_t InUse; + u_int32_t prev; + u_int32_t next; + u_int32_t ClientStation; + u_int32_t ClientTask; + u_int32_t ClientObjectID; + u_int32_t TargetServerID; + u_int8_t TargetExecTime[6]; + u_int8_t JobEntryTime[6]; + u_int32_t JobNumber; + u_int16_t JobType; + u_int16_t JobPosition; + u_int16_t JobControlFlags; + u_int8_t FileNameLen; + char JobFileName[13]; + u_int32_t JobFileHandle; + u_int32_t ServerStation; + u_int32_t ServerTaskNumber; + u_int32_t ServerObjectID; + char JobTextDescription[50]; + char ClientRecordArea[152]; +} __packed; struct queue_job { struct nw_queue_job_entry j; @@ -157,44 +157,44 @@ struct queue_job { #define PRINT_BANNER 0x8000 struct print_job_record { - u_int8_t Version __attribute__((packed)); - u_int8_t TabSize __attribute__((packed)); - u_int16_t Copies __attribute__((packed)); - u_int16_t CtrlFlags __attribute__((packed)); - u_int16_t Lines __attribute__((packed)); - u_int16_t Rows __attribute__((packed)); - char FormName[16] __attribute__((packed)); - u_int8_t Reserved[6] __attribute__((packed)); - char BannerName[13] __attribute__((packed)); - char FnameBanner[13] __attribute__((packed)); - char FnameHeader[14] __attribute__((packed)); - char Path[80] __attribute__((packed)); -}; + u_int8_t Version; + u_int8_t TabSize; + u_int16_t Copies; + u_int16_t CtrlFlags; + u_int16_t Lines; + u_int16_t Rows; + char FormName[16]; + u_int8_t Reserved[6]; + char BannerName[13]; + char FnameBanner[13]; + char FnameHeader[14]; + char Path[80]; +} __packed; struct ncp_station_addr { u_int32_t NetWork; u_int8_t Node[6]; u_int16_t Socket; -} __attribute__((packed)); +} __packed; struct ncp_prop_login_control { - u_int8_t AccountExpireDate[3] __attribute__((packed)); - u_int8_t Disabled __attribute__((packed)); - u_int8_t PasswordExpireDate[3] __attribute__((packed)); - u_int8_t GraceLogins __attribute__((packed)); - u_int16_t PasswordExpireInterval __attribute__((packed)); - u_int8_t MaxGraceLogins __attribute__((packed)); - u_int8_t MinPasswordLength __attribute__((packed)); - u_int16_t MaxConnections __attribute__((packed)); - u_int8_t ConnectionTimeMask[42] __attribute__((packed)); - u_int8_t LastLogin[6] __attribute__((packed)); - u_int8_t RestrictionMask __attribute__((packed)); - u_int8_t reserved __attribute__((packed)); - u_int32_t MaxDiskUsage __attribute__((packed)); - u_int16_t BadLoginCount __attribute__((packed)); - u_int32_t BadLoginCountDown __attribute__((packed)); - struct ncp_station_addr LastIntruder __attribute__((packed)); -}; + u_int8_t AccountExpireDate[3]; + u_int8_t Disabled; + u_int8_t PasswordExpireDate[3]; + u_int8_t GraceLogins; + u_int16_t PasswordExpireInterval; + u_int8_t MaxGraceLogins; + u_int8_t MinPasswordLength; + u_int16_t MaxConnections; + u_int8_t ConnectionTimeMask[42]; + u_int8_t LastLogin[6]; + u_int8_t RestrictionMask; + u_int8_t reserved; + u_int32_t MaxDiskUsage; + u_int16_t BadLoginCount; + u_int32_t BadLoginCountDown; + struct ncp_station_addr LastIntruder; +} __packed; #define NCP_VOLNAME_LEN (16) #define NCP_NUMBER_OF_VOLUMES (64) @@ -314,7 +314,7 @@ struct nw_entry_info { u_int32_t NSCreator; u_int8_t nameLen; u_int8_t entryName[256]; -} __attribute__((packed)); +} __packed; typedef struct nw_entry_info NW_ENTRY_INFO; @@ -334,59 +334,59 @@ typedef struct nw_entry_info NW_ENTRY_INFO; #define DM_MAXIMUM_SPACE 0x2000L struct nw_modify_dos_info { - u_int32_t attributes __attribute__((packed)); - u_int16_t creationDate __attribute__((packed)); - u_int16_t creationTime __attribute__((packed)); - u_int32_t creatorID __attribute__((packed)); - u_int16_t modifyDate __attribute__((packed)); - u_int16_t modifyTime __attribute__((packed)); - u_int32_t modifierID __attribute__((packed)); - u_int16_t archiveDate __attribute__((packed)); - u_int16_t archiveTime __attribute__((packed)); - u_int32_t archiverID __attribute__((packed)); - u_int16_t lastAccessDate __attribute__((packed)); - u_int16_t inheritanceGrantMask __attribute__((packed)); - u_int16_t inheritanceRevokeMask __attribute__((packed)); - u_int32_t maximumSpace __attribute__((packed)); -}; + u_int32_t attributes; + u_int16_t creationDate; + u_int16_t creationTime; + u_int32_t creatorID; + u_int16_t modifyDate; + u_int16_t modifyTime; + u_int32_t modifierID; + u_int16_t archiveDate; + u_int16_t archiveTime; + u_int32_t archiverID; + u_int16_t lastAccessDate; + u_int16_t inheritanceGrantMask; + u_int16_t inheritanceRevokeMask; + u_int32_t maximumSpace; +} __packed; struct nw_search_seq { u_int8_t volNumber; u_int32_t dirNumber; u_int32_t searchDirNumber; -} __attribute__((packed)); +} __packed; typedef struct nw_search_seq SEARCH_SEQUENCE; struct ncp_file_server_info { - u_int8_t ServerName[48] __attribute__((packed)); - u_int8_t FileServiceVersion __attribute__((packed)); - u_int8_t FileServiceSubVersion __attribute__((packed)); - u_int16_t MaximumServiceConnections __attribute__((packed)); - u_int16_t ConnectionsInUse __attribute__((packed)); - u_int16_t NumberMountedVolumes __attribute__((packed)); - u_int8_t Revision __attribute__((packed)); - u_int8_t SFTLevel __attribute__((packed)); - u_int8_t TTSLevel __attribute__((packed)); - u_int16_t MaxConnectionsEverUsed __attribute__((packed)); - u_int8_t AccountVersion __attribute__((packed)); - u_int8_t VAPVersion __attribute__((packed)); - u_int8_t QueueVersion __attribute__((packed)); - u_int8_t PrintVersion __attribute__((packed)); - u_int8_t VirtualConsoleVersion __attribute__((packed)); - u_int8_t RestrictionLevel __attribute__((packed)); - u_int8_t InternetBridge __attribute__((packed)); - u_int8_t Reserved[60] __attribute__((packed)); -}; + u_int8_t ServerName[48]; + u_int8_t FileServiceVersion; + u_int8_t FileServiceSubVersion; + u_int16_t MaximumServiceConnections; + u_int16_t ConnectionsInUse; + u_int16_t NumberMountedVolumes; + u_int8_t Revision; + u_int8_t SFTLevel; + u_int8_t TTSLevel; + u_int16_t MaxConnectionsEverUsed; + u_int8_t AccountVersion; + u_int8_t VAPVersion; + u_int8_t QueueVersion; + u_int8_t PrintVersion; + u_int8_t VirtualConsoleVersion; + u_int8_t RestrictionLevel; + u_int8_t InternetBridge; + u_int8_t Reserved[60]; +} __packed; struct nw_time_buffer { - u_int8_t year __attribute__((packed)); - u_int8_t month __attribute__((packed)); - u_int8_t day __attribute__((packed)); - u_int8_t hour __attribute__((packed)); - u_int8_t minute __attribute__((packed)); - u_int8_t second __attribute__((packed)); - u_int8_t wday __attribute__((packed)); -}; + u_int8_t year; + u_int8_t month; + u_int8_t day; + u_int8_t hour; + u_int8_t minute; + u_int8_t second; + u_int8_t wday; +} __packed; #endif /*_NCP_H_ */ diff --git a/sys/platform/pc32/include/pc/vesa.h b/sys/platform/pc32/include/pc/vesa.h index bade8bd839..0433528511 100644 --- a/sys/platform/pc32/include/pc/vesa.h +++ b/sys/platform/pc32/include/pc/vesa.h @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/pc/vesa.h,v 1.7 1999/12/29 04:33:12 peter Exp $ - * $DragonFly: src/sys/platform/pc32/include/pc/vesa.h,v 1.4 2005/05/07 13:06:44 swildner Exp $ + * $DragonFly: src/sys/platform/pc32/include/pc/vesa.h,v 1.5 2007/09/15 13:18:40 swildner Exp $ */ #ifndef _MACHINE_PC_VESA_H @@ -32,21 +32,21 @@ struct vesa_info { /* mandatory fields */ - uint8_t v_sig[4] __attribute__ ((packed)); /* VESA */ - uint16_t v_version __attribute__ ((packed)); /* ver in BCD */ - uint32_t v_oemstr __attribute__ ((packed)); /* OEM string */ - uint32_t v_flags __attribute__ ((packed)); /* flags */ + uint8_t v_sig[4]; /* VESA */ + uint16_t v_version; /* ver in BCD */ + uint32_t v_oemstr; /* OEM string */ + uint32_t v_flags; /* flags */ #define V_DAC8 (1<<0) #define V_NONVGA (1<<1) #define V_SNOW (1<<2) - uint32_t v_modetable __attribute__ ((packed)); /* modes */ - uint16_t v_memsize __attribute__ ((packed)); /* in 64K */ + uint32_t v_modetable; /* modes */ + uint16_t v_memsize; /* in 64K */ /* 2.0 */ - uint16_t v_revision __attribute__ ((packed)); /* software rev */ - uint32_t v_vendorstr __attribute__ ((packed)); /* vendor */ - uint32_t v_prodstr __attribute__ ((packed)); /* product name */ - uint32_t v_revstr __attribute__ ((packed)); /* product rev */ -}; + uint16_t v_revision; /* software rev */ + uint32_t v_vendorstr; /* vendor */ + uint32_t v_prodstr; /* product name */ + uint32_t v_revstr; /* product rev */ +} __packed; struct vesa_mode { /* mandatory fields */ -- 2.11.4.GIT