mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 05:28:14 +00:00
[PSDK] Remove a buggy GNU-specific "PACKED" attribute in KEY_EVENT_RECORD structure declaration. (#3619)
CORE-17545
No other public header out there (in MS PSDK, MinGW, Wine, etc...) does have
this hack (that was introduced back in the days in r15141 / commit 01df92bc
).
Add static assert on KEY_EVENT_RECORD's uChar member to ensure it's properly aligned.
May fix Clang warning:
win32ss/user/winsrv/consrv/lineinput.c:457:62: warning: taking address of packed member 'uChar' of class or structure '_KEY_EVENT_RECORD' may result in an unaligned pointer value [-Waddress-of-packed-member]
LineInputEdit(Console, (Overstrike ? 1 : 0), 1, &KeyEvent->uChar.UnicodeChar);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
and whatnot...
This commit is contained in:
parent
9a93d2fe3a
commit
db089c517e
1 changed files with 3 additions and 6 deletions
|
@ -246,12 +246,9 @@ typedef struct _KEY_EVENT_RECORD {
|
|||
CHAR AsciiChar;
|
||||
} uChar;
|
||||
DWORD dwControlKeyState;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
/* gcc's alignment is not what win32 expects */
|
||||
PACKED
|
||||
#endif
|
||||
KEY_EVENT_RECORD, *PKEY_EVENT_RECORD;
|
||||
} KEY_EVENT_RECORD, *PKEY_EVENT_RECORD;
|
||||
|
||||
C_ASSERT(FIELD_OFFSET(KEY_EVENT_RECORD, uChar) == 0xA);
|
||||
|
||||
typedef struct _MOUSE_EVENT_RECORD {
|
||||
COORD dwMousePosition;
|
||||
|
|
Loading…
Reference in a new issue