From 22504419c7a0d266fe896754e5dcadda2cbac53d Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Wed, 24 Jan 2018 21:20:24 +0100 Subject: [PATCH] Compile warning fixes --- src/item.c | 1 + src/item_builder.c | 9 +++++---- src/item_builder.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/item.c b/src/item.c index e600e3f..779d312 100644 --- a/src/item.c +++ b/src/item.c @@ -1,3 +1,4 @@ +#include #include "item.h" #include "util.h" diff --git a/src/item_builder.c b/src/item_builder.c index 7042fb6..87b2727 100644 --- a/src/item_builder.c +++ b/src/item_builder.c @@ -1,4 +1,5 @@ #include +#include #include "item_builder.h" #include "texture.h" @@ -16,7 +17,7 @@ item_builder_init(SDL_Renderer *renderer) } static void -check_builder() +check_builder(void) { if (!builder) fatal("item_builder_init() not run"); @@ -46,7 +47,7 @@ add_health(Item *item, Player *player) } static Item * -create_health() +create_health(void) { Texture *t; Item *item; @@ -70,7 +71,7 @@ item_builder_build_item(ItemKey key) Item *item = NULL; switch (key) { case HEALTH: - item = create_health(builder); + item = create_health(); break; default: fatal("in item_builder_build() : Unhandled item key %d", key); @@ -81,7 +82,7 @@ item_builder_build_item(ItemKey key) } void -item_builder_close() +item_builder_close(void) { ht_destroy_custom(builder->textures, (void (*)(void*)) &texture_destroy); free(builder); diff --git a/src/item_builder.h b/src/item_builder.h index f55b41b..3783268 100644 --- a/src/item_builder.h +++ b/src/item_builder.h @@ -20,6 +20,6 @@ Item * item_builder_build_item(ItemKey key); void -item_builder_close(); +item_builder_close(void); #endif // ITEMBUILDER_H_ \ No newline at end of file