Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Leeloo

1 Sec Music

Recommended Posts

Ok, I spent some time trying to debug my problem with music playing for 1 second then turning off, without getting any further than that it had to be an uninitialized variable somewhere (hey, how else can it happen to only a few people?)

 

I gave up debugging, and thought "why not let the compiler do the job". So, I added "-O -Werror" to the debug build command line, and:

 

cc -march=i686 -O -Wall -Werror -ggdb -pipe -DLINUX -DELC -I/usr/local/include/SDL -D_REENTRANT -I/usr/local/include/libxml2 -c sound.c
cc1: warnings being treated as errors
sound.c: In function `update_music':
sound.c:321: warning: `fade' might be used uninitialized in this function
make: *** [sound.o] Error 1

 

Perfect, initializing fade to zero makes the music play as it should. Please apply ASAP - and consider making -O -Werror part of the debug build process.

Share this post


Link to post
Share on other sites

cvs up

 

Added -Werror to the Makefile, i think you're quite right on that.

Share this post


Link to post
Share on other sites
No comments on this, and not fixed in CVS yet... Did all the programmers leave for christmas holidays?

I've been noticing that too. :ph34r: .

Share this post


Link to post
Share on other sites
cvs up

 

Added -Werror to the Makefile, i think you're quite right on that.

-O is the one who finds variables that are used without being initialized.

Share this post


Link to post
Share on other sites
cvs up

 

Added -Werror to the Makefile, i think you're quite right on that.

-O is the one who finds variables that are used without being initialized.

Yea, and it's in CVS ;)

Share this post


Link to post
Share on other sites
No comments on this, and not fixed in CVS yet... Did all the programmers leave for christmas holidays?

Not exactly, I was just away for a few days moving back home for the holidays, getting my computer re-connected at my parents' house, etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×