ref: 4a833cdb45aaf25b6419217a587816ebab5f5bfa
parent: f7c88d8dd307a277bbecf1b64a916d8d9dbb060e
author: Simon Howard <[email protected]>
date: Sat Feb 12 16:25:18 EST 2011
Turn on gcc warnings for declarations made in a block after a statement; this is not supported by the Microsoft compiler. Subversion-branch: /branches/strife-branch Subversion-revision: 2261
--- a/configure.in
+++ b/configure.in
@@ -27,7 +27,8 @@
if test "$GCC" = "yes"
then
- CFLAGS="-O$OPT_LEVEL -g -Wall $orig_CFLAGS"
+ WARNINGS="-Wall -Wdeclaration-after-statement"
+ CFLAGS="-O$OPT_LEVEL -g $WARNINGS $orig_CFLAGS"
fi
dnl Search for SDL ...
--- a/opl/dbopl.c
+++ b/opl/dbopl.c
@@ -412,9 +412,8 @@
}
static inline Bit32s Operator__RateForward(Operator *self, Bit32u add ) {
- Bit32s ret; // haleyjd: GNUisms out!
self->rateIndex += add;
- ret = self->rateIndex >> RATE_SH;
+ Bit32s ret = self->rateIndex >> RATE_SH;
self->rateIndex = self->rateIndex & RATE_MASK;
return ret;
}