[newlib-cygwin] Cygwin: cygserver: drop useless packed attribute
Corinna Vinschen
corinna@sourceware.org
Wed Feb 26 20:13:00 GMT 2020
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__
More information about the Cygwin-cvs
mailing list