Skip to content

Commit

Permalink
Remove some annoying warnings (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
pusewicz authored Mar 4, 2025
1 parent 23dd8fd commit 6fc91b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions samples/platformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ void update_stars(Game *game)
{
int last_index = cf_array_count(game->stars) - 1;
CF_MEMCPY(game->stars + index, game->stars + last_index, sizeof(stars[0]));
cf_array_pop(game->stars);
CF_UNUSED(cf_array_pop(game->stars));
continue;
}

Expand Down Expand Up @@ -1264,7 +1264,7 @@ void update_players(Game *game)
{
int last_index = cf_array_count(game->players) - 1;
CF_MEMCPY(players + index, players + last_index, sizeof(players[0]));
cf_array_pop(game->players);
CF_UNUSED(cf_array_pop(game->players));
continue;
}

Expand Down Expand Up @@ -1322,7 +1322,7 @@ void update_star_particles(Game *game)
{
int last_index = cf_array_count(particles) - 1;
CF_MEMCPY(particles + index, particles + last_index, sizeof(particles[0]));
cf_array_pop(particles);
CF_UNUSED(cf_array_pop(particles));
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/cute_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static void s_init_video()
CF_DisplayID cf_default_display()
{
s_init_video();
return { SDL_GetPrimaryDisplay() };
return SDL_GetPrimaryDisplay();
}

int cf_display_count()
Expand Down
2 changes: 1 addition & 1 deletion test/test_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TEST_CASE(test_array_macros_simple)
REQUIRE(vec[2] == 3);
REQUIRE(apop(vec) == 3);
REQUIRE(alen(vec) == 2);
apop(vec);
CF_UNUSED(apop(vec));
REQUIRE(apop(vec) == 1);
REQUIRE(alen(vec) == 0);
for (int i = 0; i < 32; ++i) {
Expand Down

0 comments on commit 6fc91b7

Please sign in to comment.