Skip to content

Commit dedf0fc

Browse files
LiquidityCLinus Probert
andauthored
Fix Mac compile warnings (#129)
Co-authored-by: Linus Probert <lprobert@apple.com>
1 parent 0220956 commit dedf0fc

9 files changed

Lines changed: 9 additions & 16 deletions

File tree

lib/lua-5.3.5/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,3 @@ add_library(lua STATIC
4848
src/lzio.c
4949
)
5050

51-
if (NOT MSVC)
52-
target_link_libraries(lua
53-
-lm
54-
)
55-
endif ()

src/hiscore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ DbQuery MIGRATE_COMMANDS[] = {
4141
"FOREIGN KEY(hiscoreId) REFERENCES hiscore(id))",
4242
NULL, NULL
4343
},
44-
{ NULL } // Sentinel
44+
{ NULL, NULL, NULL } // Sentinel
4545
};
4646

4747
static int

src/item.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ item_collected(Item *item, Player *player)
8989
gui_log("You find nothing inside");
9090
}
9191

92-
if (item->price) {
92+
if (item->price > 0) {
9393
player->gold -= item->price;
9494
char costLabel[10];
9595
m_sprintf(costLabel, 10, "-$%.0f", item->price);

src/object.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#include "object.h"
2020
#include "gui.h"
2121
#include "util.h"
22-
#include "mixer.h"
23-
#include "random.h"
2422
#include "texturecache.h"
2523

2624
Object *
@@ -36,7 +34,7 @@ object_create(void)
3634
}
3735

3836
Object *
39-
object_create_fire()
37+
object_create_fire(void)
4038
{
4139
Object *o = object_create();
4240
Texture *t0 = texturecache_add("Objects/Effect0.png");
@@ -51,7 +49,7 @@ object_create_fire()
5149
}
5250

5351
Object *
54-
object_create_green_gas()
52+
object_create_green_gas(void)
5553
{
5654
Object *o = object_create();
5755
Texture *t0 = texturecache_add("Objects/Effect0.png");

src/particle_engine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ particle_engine_wind(Vector2d direction)
348348
}
349349

350350
void
351-
particle_engine_heat()
351+
particle_engine_heat(void)
352352
{
353353
unsigned int count = 5;
354354

src/settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ DbQuery MIGRATE_COMMANDS[] = {
4141
"value INTEGER)",
4242
NULL, NULL
4343
},
44-
{ NULL } // Sentinel
44+
{ NULL, NULL, NULL} // Sentinel
4545
};
4646

4747
static int load_settings_cb(void *unused, int count, char **values, char **colNames);

src/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "util.h"
2222
#include "timer.h"
2323

24-
Timer* _timer_create()
24+
Timer* _timer_create(void)
2525
{
2626
Timer *t = ec_malloc(sizeof(Timer));
2727
t->startTime = 0;

src/tooltip_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Sprite* tooltip_manager_get_tooltip(TooltipType type)
128128
return NULL;
129129
}
130130

131-
void tooltip_manager_close()
131+
void tooltip_manager_close(void)
132132
{
133133
tooltip_destroy(new_skill_tooltip);
134134
tooltip_destroy(howto_tooltip);

src/trap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "actiontextbuilder.h"
2525

2626
Trap *
27-
trap_create()
27+
trap_create(void)
2828
{
2929
Trap *trap = ec_malloc(sizeof(Trap));
3030
trap->sprite = sprite_create();

0 commit comments

Comments
 (0)