Proposed Fixes for Various GCC Warnings
#16
I uploaded another patch to sourceforge relating to uninitialized variables.

This patch fixes various stack (aka local or automatic) variables that may be uninitialized before their first read.

In all cases, I initialized them to a "safe" default value. This should help prevent unexpected behaviour when these variables are read for the first time.

https://sourceforge.net/tracker/index.ph...tid=581840
Reply
#17
Committed. thanks a lot for all your patches, monkeyman!!
Reply
#18
You're welcome. Just make sure jmarshall knows that the most recent patches can be backported to the trunk.
Reply
#19
Here are some fixes for the last few warnings other than signed-unsigned comparison and constant string conversion.

I suggest that -Wno-write-strings should be appended to the debug flags variable in the Makefile. These warnings are not needed and they tend to clutter up output on newer versions of GCC when -Wall is specified.

Also, I'm not sure how to fix this warning:
DVDPlayerAudio.cpp: In member function 'int CDVDPlayerAudio:Big GrinecodeFrame(DVDAudioFrame&, bool)':
DVDPlayerAudio.cpp:338: warning: control reaches end of non-void function

One could simply return 0 at the end, but I don't know what the side effects of doing so are.

Otherwise, compilations should now be warning-free!

https://sourceforge.net/tracker/index.ph...tid=581840
Reply

Logout Mark Read Team Forum Stats Members Help
Proposed Fixes for Various GCC Warnings0