summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-12 08:42:27 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-12 08:42:27 +0000
commit3cb816927a6238ca030426bdb83309f0584888b4 (patch)
treef71456386b7105bdd84d754c4387f88bfa21c6e5
parent29ffe55ad8828e8d5d9fb20ae2c2331384f107f0 (diff)
downloadcrawl-ref-3cb816927a6238ca030426bdb83309f0584888b4.tar.gz
crawl-ref-3cb816927a6238ca030426bdb83309f0584888b4.zip
Added -O2 -Wuninitialized and fixed uninitialized variable.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2447 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/makefile.unix5
-rw-r--r--crawl-ref/source/randart.cc2
2 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/makefile.unix b/crawl-ref/source/makefile.unix
index 94e0b9d4f0..8af0e759b1 100644
--- a/crawl-ref/source/makefile.unix
+++ b/crawl-ref/source/makefile.unix
@@ -89,10 +89,9 @@ LIB = -l$(LIBCURS) -L$(LUASRC) -l$(LUALIB) $(LIBDBM)
INCLUDES := $(INCLUDES) -Iutil -I. -I$(LUASRC) $(EXTRA_INCLUDES)
-CFWARN := -Wall -Wwrite-strings \
- -Wshadow -pedantic
+CFWARN := -Wall -Wwrite-strings -Wshadow -Wuninitialized -pedantic
-CFOTHERS := -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS
+CFOTHERS := -O2 -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS
ifneq ($(SAVEDIR),)
CFOTHERS += '-DSAVE_DIR_PATH="$(SAVEDIR)"'
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index ddb82eee5e..ffd630cf52 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -1366,7 +1366,7 @@ int randart_wpn_num_props( const item_def &item )
int randart_wpn_num_props( const randart_properties_t &proprt )
{
- int num;
+ int num = 0;
for (int i = 0; i < RAP_NUM_PROPERTIES; i++)
if (proprt[i] != 0)