From 0a37e9f0bc24c6d326816e6686c4eaa25b4fd83e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Feb 2020 20:52:55 +0100 Subject: [PATCH] Cygwin: cygserver: drop useless packed attribute ...from structs used for data exchange between clients and cygserver. All of the structs have the same size and member offsets, packed or unpacked. Keeping the packed attribute results in ominous warnings from gcc-9.2.0: cygserver.cc:259:10: warning: taking address of packed member of 'client_request_attach_tty::request_attach_tty' may result in an unaligned pointer value [-Waddress-of-packed-member] Signed-off-by: Corinna Vinschen --- winsup/cygwin/cygserver.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/cygserver.h b/winsup/cygwin/cygserver.h index 9de8c4470..2788fa377 100644 --- a/winsup/cygwin/cygserver.h +++ b/winsup/cygwin/cygserver.h @@ -11,12 +11,6 @@ details. */ #ifndef _CYGSERVER_H_ #define _CYGSERVER_H_ -#ifdef __GNUC__ -#define CYGSERVER_PACKED __attribute__ ((packed)) -#else -#define CYGSERVER_PACKED -#endif - #define CYGWIN_SERVER_VERSION_MAJOR 1 #define CYGWIN_SERVER_VERSION_API 4 #define CYGWIN_SERVER_VERSION_MINOR 0 @@ -65,7 +59,7 @@ protected: header_t () {}; header_t (request_code_t, size_t); - } CYGSERVER_PACKED; + }; public: #ifndef __INSIDE_CYGWIN__ @@ -111,7 +105,7 @@ private: struct request_get_version { DWORD major, api, minor, patch; - } CYGSERVER_PACKED; + }; public: client_request_get_version (); @@ -156,7 +150,7 @@ private: { DWORD pid, master_pid; HANDLE from_master, to_master; - } CYGSERVER_PACKED; + }; public: #ifdef __INSIDE_CYGWIN__