From d7e5876c62001e1848fdc7c2dc12d7e1483cdc79 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 7 Jul 2015 09:44:24 +0200 Subject: [PATCH] fix build, missing limits.h include --- src/spy.c | 3 ++- src/spy.test.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/spy.c b/src/spy.c index 73af0148f..a440ab3aa 100644 --- a/src/spy.c +++ b/src/spy.c @@ -53,6 +53,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include +#include /* in spy steht der Unterschied zwischen Wahrnehmung des Opfers und * Spionage des Spions */ @@ -61,7 +62,7 @@ void spy_message(int spy, const unit * u, const unit * target) const char *str = report_kampfstatus(target, u->faction->locale); ADDMSG(&u->faction->msgs, msg_message("spyreport", "spy target status", u, - target, str)); + target, str)); if (spy > 20) { sc_mage *mage = get_mage(target); /* for mages, spells and magic school */ diff --git a/src/spy.test.c b/src/spy.test.c index 7e0f715c0..46b52e32d 100644 --- a/src/spy.test.c +++ b/src/spy.test.c @@ -68,9 +68,9 @@ static void test_simple_spy_message(CuTest *tc) { static void set_factionstealth(unit *u, faction *f) { attrib *a = a_find(u->attribs, &at_otherfaction); if (!a) - a = a_add(&u->attribs, make_otherfaction(f)); + a = a_add(&u->attribs, make_otherfaction(f)); else - a->data.v = f; + a->data.v = f; } static void test_all_spy_message(CuTest *tc) { @@ -92,11 +92,11 @@ static void test_all_spy_message(CuTest *tc) { spy_message(99, fix.spy, fix.victim); assert_messages(tc, fix.spy->faction->msgs->begin, fix.msg_types, 5, true, - M_BASE, - M_MAGE, - M_FACTION, - M_SKILLS, - M_ITEMS); + M_BASE, + M_MAGE, + M_FACTION, + M_SKILLS, + M_ITEMS); test_cleanup(); } @@ -116,7 +116,7 @@ static void test_sabotage_self(CuTest *tc) { r = test_create_region(0, 0, NULL); assert(r); u = test_create_unit(test_create_faction(NULL), r); - assert(u && u->faction && u->region==r); + assert(u && u->faction && u->region == r); u->ship = test_create_ship(r, test_create_shiptype("boat")); assert(u->ship); ord = create_order(K_SABOTAGE, lang, "SCHIFF"); @@ -128,9 +128,9 @@ static void test_sabotage_self(CuTest *tc) { CuSuite *get_spy_suite(void) { - CuSuite *suite = CuSuiteNew(); - SUITE_ADD_TEST(suite, test_simple_spy_message); - SUITE_ADD_TEST(suite, test_all_spy_message); - SUITE_ADD_TEST(suite, test_sabotage_self); - return suite; + CuSuite *suite = CuSuiteNew(); + SUITE_ADD_TEST(suite, test_simple_spy_message); + SUITE_ADD_TEST(suite, test_all_spy_message); + SUITE_ADD_TEST(suite, test_sabotage_self); + return suite; }