We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 537 - Fixes for C++ compilation with -Wold-style cast
Summary: Fixes for C++ compilation with -Wold-style cast
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: Other Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks: 538
  Show dependency treegraph
 
Reported: 2008-01-07 16:20 UTC by esigra
Modified: 2009-10-08 00:46 UTC (History)
1 user (show)

See Also:


Attachments
Patch against current SVN. (2.77 KB, patch)
2008-01-07 16:21 UTC, esigra
Details | Diff
Patch against current SDL-1.2 branch. (2.92 KB, patch)
2009-04-01 23:18 UTC, Ozkan Sezer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description esigra 2008-01-07 16:20:21 UTC
I try to get a clean compile for a project using SDL. But I get warnings
from SDL headers when I use -Wold-style-cast. This is especially bad
because I plan to build the software with -Werror=old-style-cast when we
have switched over to GCC 4.2, which has that option.

But this problem can be fixed in the SDL headers. I checked out the SVN
version and made some patches. See the attached patch.
Comment 1 esigra 2008-01-07 16:21:32 UTC
Created attachment 243 [details]
Patch against current SVN.
Comment 2 Sam Lantinga 2008-11-25 11:33:41 UTC
Thank you very much for your patch for SDL 1.3!

Do you give me permission to release your code with SDL 1.3 and future
versions of SDL under both the LGPL and a closed-source commercial
license?
Comment 3 esigra 2008-12-28 03:59:43 UTC
Yes, that patch can be used with any license. (It took a while to see your message here because this bugzilla is too old to have the feature to set an e-mail address (bug #573).)
Comment 4 Sam Lantinga 2009-02-16 20:58:11 UTC
Thanks, this is fixed in revision 4431.
Comment 5 Ozkan Sezer 2009-04-01 23:17:13 UTC
This change should be applied to the 1.2 branch, too, because the svn version SDL_net requires it.
Comment 6 Ozkan Sezer 2009-04-01 23:18:25 UTC
Created attachment 313 [details]
Patch against current SDL-1.2 branch.
Comment 7 Sam Lantinga 2009-10-08 00:46:08 UTC
This is in for 1.2, thanks!