Compile warning fixes
This commit is contained in:
parent
417cb78f31
commit
22504419c7
|
@ -1,3 +1,4 @@
|
||||||
|
#include <stdlib.h>
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "item_builder.h"
|
#include "item_builder.h"
|
||||||
#include "texture.h"
|
#include "texture.h"
|
||||||
|
@ -16,7 +17,7 @@ item_builder_init(SDL_Renderer *renderer)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_builder()
|
check_builder(void)
|
||||||
{
|
{
|
||||||
if (!builder)
|
if (!builder)
|
||||||
fatal("item_builder_init() not run");
|
fatal("item_builder_init() not run");
|
||||||
|
@ -46,7 +47,7 @@ add_health(Item *item, Player *player)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Item *
|
static Item *
|
||||||
create_health()
|
create_health(void)
|
||||||
{
|
{
|
||||||
Texture *t;
|
Texture *t;
|
||||||
Item *item;
|
Item *item;
|
||||||
|
@ -70,7 +71,7 @@ item_builder_build_item(ItemKey key)
|
||||||
Item *item = NULL;
|
Item *item = NULL;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case HEALTH:
|
case HEALTH:
|
||||||
item = create_health(builder);
|
item = create_health();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fatal("in item_builder_build() : Unhandled item key %d", key);
|
fatal("in item_builder_build() : Unhandled item key %d", key);
|
||||||
|
@ -81,7 +82,7 @@ item_builder_build_item(ItemKey key)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
item_builder_close()
|
item_builder_close(void)
|
||||||
{
|
{
|
||||||
ht_destroy_custom(builder->textures, (void (*)(void*)) &texture_destroy);
|
ht_destroy_custom(builder->textures, (void (*)(void*)) &texture_destroy);
|
||||||
free(builder);
|
free(builder);
|
||||||
|
|
|
@ -20,6 +20,6 @@ Item *
|
||||||
item_builder_build_item(ItemKey key);
|
item_builder_build_item(ItemKey key);
|
||||||
|
|
||||||
void
|
void
|
||||||
item_builder_close();
|
item_builder_close(void);
|
||||||
|
|
||||||
#endif // ITEMBUILDER_H_
|
#endif // ITEMBUILDER_H_
|
Loading…
Reference in New Issue