public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: cygserver: drop useless packed attribute
@ 2020-02-26 20:13 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2020-02-26 20:13 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0a37e9f0bc24c6d326816e6686c4eaa25b4fd83e

commit 0a37e9f0bc24c6d326816e6686c4eaa25b4fd83e
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Feb 26 20:52:55 2020 +0100

    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 <corinna@vinschen.de>

Diff:
---
 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 9de8c44..2788fa3 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__


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-26 20:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26 20:13 [newlib-cygwin] Cygwin: cygserver: drop useless packed attribute Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).