From 20c98d67894a6fe8c8fac01e841108b5878160db Mon Sep 17 00:00:00 2001 From: ennewalker Date: Tue, 2 Dec 2008 01:34:14 +0000 Subject: Fixing Linux compile warnings and errors. (Although, not the one Johanna is seeing.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7715 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/makefile_tiles.unix | 2 +- crawl-ref/source/rltiles/tool/tile_list_processor.cc | 9 ++++----- crawl-ref/source/tilebuf.h | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crawl-ref/source/makefile_tiles.unix b/crawl-ref/source/makefile_tiles.unix index f364506d7b..0fd7fdebbb 100644 --- a/crawl-ref/source/makefile_tiles.unix +++ b/crawl-ref/source/makefile_tiles.unix @@ -125,7 +125,7 @@ LIB = -L$(LUASRC) -l$(LUALIB) $(LIBDBM) -lpng $(SDL_LDFLAGS) -lGL -lGLU -lSDL_im INCLUDES := $(INCLUDES) -Iutil -I. -I$(LUASRC) $(EXTRA_INCLUDES) $(PNG_INCLUDE) $(FREETYPE_INCLUDE) -CFWARN := -Wall -Wwrite-strings -Wshadow -pedantic +CFWARN := -Wall -Wwrite-strings -Wshadow -pedantic -Wno-parentheses CFOTHERS := -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS diff --git a/crawl-ref/source/rltiles/tool/tile_list_processor.cc b/crawl-ref/source/rltiles/tool/tile_list_processor.cc index 4f43f20793..35df77d221 100644 --- a/crawl-ref/source/rltiles/tool/tile_list_processor.cc +++ b/crawl-ref/source/rltiles/tool/tile_list_processor.cc @@ -499,7 +499,7 @@ bool tile_list_processor::write_data() { if (m_name == "") { - fprintf(stderr, "Error: can't write data with no %name specified.\n"); + fprintf(stderr, "Error: can't write data with no %%name specified.\n"); return false; } @@ -649,7 +649,7 @@ bool tile_list_processor::write_data() fprintf(fp, "#include \n"); fprintf(fp, "#include \n"); fprintf(fp, "#include \n"); - fprintf(fp, "using namespace std;\n"); + fprintf(fp, "using namespace std;\n\n"); fprintf(fp, "int _tile_%s_count[%s - %s] =\n{\n", lcname.c_str(), max.c_str(), m_start_value.c_str()); @@ -736,8 +736,7 @@ bool tile_list_processor::write_data() fprintf(fp, "tile_%s_map::tile_%s_map()\n" - "{\n" - " map::iterator itr = begin();\n", + "{\n", lcname.c_str(), lcname.c_str()); for (unsigned int i = 0; i < m_page.m_tiles.size(); i++) @@ -751,7 +750,7 @@ bool tile_list_processor::write_data() for (unsigned int c = 0; c < enumname.size(); c++) lcenum[c] = std::tolower(enumname[c]); - fprintf(fp, " insert(itr, map::value_type(\"%s\", %d + %s));\n", + fprintf(fp, " insert(map::value_type(\"%s\", %d + %s));\n", lcenum.c_str(), i, m_start_value.c_str()); } diff --git a/crawl-ref/source/tilebuf.h b/crawl-ref/source/tilebuf.h index f1281ec977..6b0ae7eab4 100644 --- a/crawl-ref/source/tilebuf.h +++ b/crawl-ref/source/tilebuf.h @@ -13,6 +13,7 @@ class formatted_string; class GenericTexture; class TilesTexture; +#include #include struct VColour -- cgit v1.2.3-54-g00ecf