From 75113b715aaec4bd6feea80d5ff64dd4cdc7bc90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 10 Mar 2012 16:03:11 +0100 Subject: [PATCH] Misc fixes for warnings... --- library/include/ColorText.h | 1 + library/include/modules/Buildings.h | 2 +- library/modules/Buildings.cpp | 4 +--- library/modules/Gui.cpp | 1 - library/modules/Maps.cpp | 1 - plugins/showmood.cpp | 3 +++ 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/include/ColorText.h b/library/include/ColorText.h index 6310eefda..cdeaa3948 100644 --- a/library/include/ColorText.h +++ b/library/include/ColorText.h @@ -75,6 +75,7 @@ namespace DFHack protected: virtual int sync() { owner->flush_buffer(true); + return 0; } }; diff --git a/library/include/modules/Buildings.h b/library/include/modules/Buildings.h index a78655160..73542450b 100644 --- a/library/include/modules/Buildings.h +++ b/library/include/modules/Buildings.h @@ -80,7 +80,7 @@ DFHACK_EXPORT bool Read (const uint32_t index, t_building & building); * read mapping from custom_type value to building RAW name * custom_type of -1 implies ordinary building */ -DFHACK_EXPORT bool ReadCustomWorkshopTypes(color_ostream &out, std::map & btypes); +DFHACK_EXPORT bool ReadCustomWorkshopTypes(std::map & btypes); } } diff --git a/library/modules/Buildings.cpp b/library/modules/Buildings.cpp index 650776649..6317f3e10 100644 --- a/library/modules/Buildings.cpp +++ b/library/modules/Buildings.cpp @@ -72,18 +72,16 @@ bool Buildings::Read (const uint32_t index, t_building & building) return true; } -bool Buildings::ReadCustomWorkshopTypes(color_ostream &out, map & btypes) +bool Buildings::ReadCustomWorkshopTypes(map & btypes) { vector & bld_def = world->raws.buildings.all; uint32_t size = bld_def.size(); btypes.clear(); - out.print("Probing vector at 0x%x for custom workshops.\n", &bld_def); for (auto iter = bld_def.begin(); iter != bld_def.end();iter++) { building_def * temp = *iter; btypes[temp->id] = temp->code; - out.print("%d : %s\n",temp->id, temp->code.c_str()); } return true; } diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index 2136cd7f0..f70d60d2a 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -494,7 +494,6 @@ bool Gui::getViewCoords (int32_t &x, int32_t &y, int32_t &z) bool Gui::setViewCoords (const int32_t x, const int32_t y, const int32_t z) { - auto cursor = df::global::cursor; (*df::global::window_x) = x; (*df::global::window_y) = y; (*df::global::window_z) = z; diff --git a/library/modules/Maps.cpp b/library/modules/Maps.cpp index 48c8d7709..32c9ac60b 100644 --- a/library/modules/Maps.cpp +++ b/library/modules/Maps.cpp @@ -200,7 +200,6 @@ bool Maps::WriteDirtyBit(uint32_t x, uint32_t y, uint32_t z, bool dirtybit) } return false; } -/* /* * Block flags */ diff --git a/plugins/showmood.cpp b/plugins/showmood.cpp index 110d8f545..d47bd8a80 100644 --- a/plugins/showmood.cpp +++ b/plugins/showmood.cpp @@ -138,6 +138,9 @@ command_result df_showmood (color_ostream &out, vector & parameters) case job_type::StrangeMoodFell: out.print("enter a fell mood?"); break; + default: + out.print("do something else..."); + break; } break;