From 2ceeb0b819d5ffbfe67d53f6de6e5b3d62f53ac5 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 25 Aug 2014 08:15:51 +0200 Subject: [PATCH] fix errors that gcc finds --- src/kernel/build.test.c | 8 ++++---- src/kernel/reports.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kernel/build.test.c b/src/kernel/build.test.c index 1b3dda5fd..efac217ae 100644 --- a/src/kernel/build.test.c +++ b/src/kernel/build.test.c @@ -74,10 +74,10 @@ static void test_build_building_no_materials(CuTest *tc) { u = setup_build(&bf); btype = bt_find("castle"); assert(btype); - set_level(bf.u, SK_BUILDING, 1); - CuAssertIntEquals(tc, ENOMATERIALS, build_building(bf.u, btype, 0, 4, 0)); - CuAssertPtrEquals(tc, 0, bf.r->buildings); - CuAssertPtrEquals(tc, 0, bf.u->building); + set_level(u, SK_BUILDING, 1); + CuAssertIntEquals(tc, ENOMATERIALS, build_building(u, btype, 0, 4, 0)); + CuAssertPtrEquals(tc, 0, u->region->buildings); + CuAssertPtrEquals(tc, 0, u->building); } static void test_build_building_with_golem(CuTest *tc) { diff --git a/src/kernel/reports.h b/src/kernel/reports.h index f6df3ce85..16fa17b93 100644 --- a/src/kernel/reports.h +++ b/src/kernel/reports.h @@ -37,6 +37,7 @@ extern "C" { extern bool nonr; extern bool nocr; extern bool noreports; + extern const char *visibility[]; /* kann_finden speedups */ bool kann_finden(struct faction *f1, struct faction *f2); @@ -86,7 +87,6 @@ extern "C" { void free_seen(void); void link_seen(seen_region * seehash[], const struct region *first, const struct region *last); - const char *visibility[]; typedef struct report_context { struct faction *f;