|
From: <gi...@cr...> - 2013-07-29 14:40:16
|
via 10fbfae4d8495bb69a1128c790672cefef45b613 (commit)
from 0cca98f75e9c368f1bed4912cdfb5ed8b3382424 (commit)
-----------------------------------------------------------------------
commit 10fbfae4d8495bb69a1128c790672cefef45b613
Author: Neil Moore <ne...@s-...>
Date: Mon Jul 29 10:21:40 2013 -0400
Avoid some unused-static warnings with NO_LUA_BINDINGS.
Using UNUSED() rather than #ifdef'ing out their definitions, because
the latter is somewhat more fragile if someone does make them
not-unused.
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/delay.cc | 4 +++-
crawl-ref/source/initfile.cc | 3 +++
crawl-ref/source/travel.cc | 2 ++
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index f4bda54..543a070 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1448,6 +1448,7 @@ void run_macro(const char *macroname)
}
}
#else
+ UNUSED(_decrement_delay);
stop_delay();
#endif
}
@@ -1496,7 +1497,8 @@ static maybe_bool _userdef_interrupt_activity(const delay_queue_item &idelay,
{
return MB_TRUE;
}
-
+#else
+ UNUSED(_activity_interrupt_name);
#endif
return MB_MAYBE;
}
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 96a64ad..d726f64 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -1452,6 +1452,9 @@ string read_init_file(bool runscript)
for (unsigned int i = 0; i < ARRAYSZ(config_defaults); ++i)
Options.include(datafile_path(config_defaults[i]), false, runscript);
+#else
+ UNUSED(lua_builtins);
+ UNUSED(config_defaults);
#endif
Options.filename = "extra opts first";
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index bbd8f1d..ce94049 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -593,6 +593,8 @@ static void _userdef_run_stoprunning_hook(void)
#ifdef CLUA_BINDINGS
if (you.running)
clua.callfn("ch_stop_running", "s", _run_mode_name(you.running));
+#else
+ UNUSED(_run_mode_name);
#endif
}
--
Dungeon Crawl Stone Soup
|