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 1475

Summary: Various minor programming mistakes, which make compiling impossible.
Product: SDL_mixer Reporter: trencher <trencher>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: marius.spix, philipp.wiesemann, trencher
Version: unspecified   
Hardware: x86_64   
OS: Windows 7   

Description trencher 2012-04-13 15:42:10 UTC
I tried to compile the 1.2.13 sdl_mixer from HG.
The used compiler is Visual Studio 2010.
Following errors were thrown:

'SDL_Overlay' : undeclared identifier MPEGfilter.h row: 39 
'SDL_Rect' : illegal use of this type as an expression MPEGfilter.h row: 39
-> possible solution: maybe a forward declaration?

Various not casted conversions. mostly from (Void*) to (Uint8*) in:

file:               rows:
music.c             518, 547,625
wavestream.c        132
mixer.c             344, 368, 1317
load_voc.c          414, 435
effects_internal.c  76, 107
effect_position.c   1152
Comment 1 Philipp Wiesemann 2012-09-08 02:30:48 UTC
There seems to be a similar problem (SDL_Overlay) when compiling with GCC (bug 1594).
Comment 2 marius.spix 2013-01-03 01:25:30 UTC
I found another issue which makes compiling with Clang impossible. I always emailed slouken, but did not receive a reply yet.

The error is a missing return value in music_mad.c in an int function which makes compiling with Clang impossible.

The patch for this follows:

--- a/music_mad.c    2012-12-22 23:45:05.675571914 +0100
+++ b/music_mad.c    2012-12-22 23:45:28.558573450 +0100
@@ -224,7 +224,7 @@
   if ((mp3_mad->status & MS_playing) == 0) {
     /* We're not supposed to be playing, so send silence instead. */
     memset(stream, 0, len);
-    return;
+    return 0;
   }
 
   out = stream;
Comment 3 Ryan C. Gordon 2017-05-29 15:22:38 UTC
The overlay thing was fixed with a patch from Bug #1594, and someone came along and cleaned up the music_mad.c return statement at some point.

I'm resolving this bug because it's been so many years and we probably fixed any other issues, too, but if this isn't the case, please reopen it and I'll try not to wait until 2023 to revisit it.  (sorry!)

--ryan.