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

Summary: Fixes for C++ compilation with -Wold-style cast
Product: SDL Reporter: esigra
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: HG 2.0   
Hardware: Other   
OS: Linux   
Bug Depends on:    
Bug Blocks: 538    
Attachments: Patch against current SVN.
Patch against current SDL-1.2 branch.

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!