Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unbalanced #pragma pack(pop) in close_code.h #2573

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

unbalanced #pragma pack(pop) in close_code.h #2573

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: HG 2.0
Reported for operating system, platform: All, x86

Comments on the original bug report:

On 2017-08-28 09:56:05 +0000, Ozkan Sezer wrote:

Revision 288 (http://hg.libsdl.org/SDL/rev/2f5a6062db86) excluded the
Watcom compiler from forcing 4 byte structure packing in begin_code.h.
However, it missed updating close_code.h, which now has an unbalanced
#pragma pack(pop) if the compiler is Watcom. The issue seems to have
crawled into SDL2, too.

The following patch upplies to both SDL-1.2 and SDL2: Please consider
applying to both.

diff -r 464908ca2d22 include/close_code.h
--- a/include/close_code.h Sun Aug 27 19:03:15 2017 -0700
+++ b/include/close_code.h Mon Aug 28 12:55:02 2017 +0300
@@ -32,7 +32,7 @@

  • @file close_code.h
  • Reset structure packing at previous byte alignment
    /
    -#if defined(_MSC_VER) || defined(MWERKS) || defined(WATCOMC) || defined(BORLANDC)
    +#if defined(_MSC_VER) || defined(MWERKS) || defined(BORLANDC)
    #ifdef BORLANDC
    #pragma nopackwarning
    #endif
    @@ -43,4 +43,3 @@
    #pragma pack(pop)
    #endif
    #endif /
    Compiler needs structure packing set */

On 2017-08-28 10:02:50 +0000, Ozkan Sezer wrote:

SDL2 version of the patch that applies cleanly:

diff -r 464908ca2d22 include/close_code.h
--- a/include/close_code.h Sun Aug 27 19:03:15 2017 -0700
+++ b/include/close_code.h Mon Aug 28 12:55:02 2017 +0300
@@ -29,7 +29,7 @@
#undef _begin_code_h

/* Reset structure packing at previous byte alignment */
-#if defined(_MSC_VER) || defined(MWERKS) || defined(WATCOMC) || defined(BORLANDC)
+#if defined(_MSC_VER) || defined(MWERKS) || defined(BORLANDC)
#ifdef BORLANDC
#pragma nopackwarning
#endif

On 2017-08-28 16:41:23 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL/rev/2c67e7e5a106
https://hg.libsdl.org/SDL/rev/8244c62d8fbc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant