Skip to content

Commit

Permalink
Fix compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bvschaik committed Jul 23, 2023
1 parent f1cefd5 commit ecc3a94
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 17 deletions.
1 change: 0 additions & 1 deletion ext/tinyfiledialogs/tinyfiledialogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ misrepresented as being the original software.
#endif /* _WIN32 */

#define MAX_PATH_OR_CMD 1024 /* _MAX_PATH or MAX_PATH */
#define MAX_MULTIPLE_FILES 32

int tinyfd_verbose = 0; /* on unix: prints the command line calls */
int tinyfd_silent = 1; /* 1 (default) or 0 : on unix,
Expand Down
8 changes: 4 additions & 4 deletions src/building/clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* For example, given a fort, return the enumaration value corresponding to
* the specific type of fort rather than the general value
*
* @param building Building to examine
* @param b Building to examine
* @return the building_type value to clone, or BUILDING_NONE if not cloneable
*/
static building_type get_clone_type_from_building(building *building)
static building_type get_clone_type_from_building(building *b)
{
building_type clone_type = building->type;
building_type clone_type = b->type;

if (building_is_house(clone_type)) {
return BUILDING_HOUSE_VACANT_LOT;
Expand All @@ -27,7 +27,7 @@ static building_type get_clone_type_from_building(building *building)
case BUILDING_RESERVOIR:
return BUILDING_DRAGGABLE_RESERVOIR;
case BUILDING_FORT:
switch (building->subtype.fort_figure_type) {
switch (b->subtype.fort_figure_type) {
case FIGURE_FORT_LEGIONARY: return BUILDING_FORT_LEGIONARIES;
case FIGURE_FORT_JAVELIN: return BUILDING_FORT_JAVELIN;
case FIGURE_FORT_MOUNTED: return BUILDING_FORT_MOUNTED;
Expand Down
6 changes: 3 additions & 3 deletions src/core/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define EMPIRE_DATA_SIZE (2000*1000*4)
#define ENEMY_DATA_SIZE 2400000
#define CYRILLIC_FONT_DATA_SIZE 1500000
#define TRAD_CHINESE_FONT_DATA_SIZE 7200000
#define CHINESE_FONT_DATA_SIZE 7200000
#define KOREAN_FONT_DATA_SIZE 7500000
#define JAPANESE_FONT_DATA_SIZE 11000000
#define SCRATCH_DATA_SIZE 12100000
Expand Down Expand Up @@ -449,7 +449,7 @@ static int parse_chinese_font(

static int load_traditional_chinese_fonts(void)
{
if (!alloc_font_memory(TRAD_CHINESE_FONT_ENTRIES, TRAD_CHINESE_FONT_DATA_SIZE)) {
if (!alloc_font_memory(TRAD_CHINESE_FONT_ENTRIES, CHINESE_FONT_DATA_SIZE)) {
return 0;
}

Expand Down Expand Up @@ -491,7 +491,7 @@ static int load_traditional_chinese_fonts(void)

static int load_simplified_chinese_fonts(void)
{
if (!alloc_font_memory(TRAD_CHINESE_FONT_ENTRIES, TRAD_CHINESE_FONT_DATA_SIZE)) {
if (!alloc_font_memory(SIMP_CHINESE_FONT_ENTRIES, CHINESE_FONT_DATA_SIZE)) {
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/smacker.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define MAX_TRACKS 7
#define MAX_PALETTE 256

#define FLAG_RING 0x01
// #define FLAG_RING 0x01 - not supported
#define FLAG_Y_INTERLACE 0x02
#define FLAG_Y_DOUBLE 0x04

Expand All @@ -27,7 +27,7 @@

#define BLOCK_MONO 0
#define BLOCK_FULL 1
#define BLOCK_VOID 2
// #define BLOCK_VOID 2 - not supported
#define BLOCK_SOLID 3

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion src/input/joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ static int translate_hotkeys(void)
return handled;
}

int translate_system_functions(void)
static int translate_system_functions(void)
{
if (get_joystick_input_for_action(MAPPING_ACTION_SHOW_VIRTUAL_KEYBOARD, &data.virtual_keyboard)) {
if (data.virtual_keyboard.state == INPUT_STATE_WENT_DOWN) {
Expand Down
6 changes: 3 additions & 3 deletions src/platform/file_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <string.h>
#include <sys/stat.h>

#if _MSC_VER
#ifdef _MSC_VER
// Of course MSVC is the only compiler that doesn't have POSIX strcasecmp...
#include <mbstring.h>
#else
Expand Down Expand Up @@ -187,7 +187,7 @@ int platform_file_manager_should_case_correct_file(void)

int platform_file_manager_compare_filename(const char *a, const char *b)
{
#if _MSC_VER
#ifdef _MSC_VER
return _mbsicmp((const unsigned char *) a, (const unsigned char *) b);
#else
return strcasecmp(a, b);
Expand All @@ -196,7 +196,7 @@ int platform_file_manager_compare_filename(const char *a, const char *b)

int platform_file_manager_compare_filename_prefix(const char *filename, const char *prefix, int prefix_len)
{
#if _MSC_VER
#ifdef _MSC_VER
return _mbsnicmp((const unsigned char *) filename, (const unsigned char *) prefix, prefix_len);
#else
return strncasecmp(filename, prefix, prefix_len);
Expand Down
2 changes: 1 addition & 1 deletion src/platform/file_manager_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,4 @@ int platform_file_manager_cache_file_has_extension(const file_info *f, const cha
return platform_file_manager_compare_filename(f->extension, extension) == 0;
}

#endif // __vita__
#endif // USE_FILE_CACHE
2 changes: 1 addition & 1 deletion src/platform/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void platform_screen_render(void)
SDL_RenderPresent(SDL.renderer);
}

void platform_screen_generate_mouse_cursor_texture(int cursor_id, int scale, const color_t *cursor_colors)
void platform_screen_generate_mouse_cursor_texture(int cursor_id, cursor_scale scale, const color_t *cursor_colors)
{
if (SDL.cursors[cursor_id]) {
SDL_DestroyTexture(SDL.cursors[cursor_id]);
Expand Down
3 changes: 2 additions & 1 deletion src/platform/screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define PLATFORM_SCREEN_H

#include "graphics/color.h"
#include "input/cursor.h"

int platform_screen_create(const char *title, int dispay_scale_percentage);
void platform_screen_destroy(void);
Expand All @@ -24,6 +25,6 @@ void platform_screen_clear(void);
void platform_screen_update(void);
void platform_screen_render(void);

void platform_screen_generate_mouse_cursor_texture(int cursor_id, int scale, const color_t *cursor_colors);
void platform_screen_generate_mouse_cursor_texture(int cursor_id, cursor_scale scale, const color_t *cursor_colors);

#endif // PLATFORM_SCREEN_H
1 change: 1 addition & 0 deletions src/widget/city_figure.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static void draw_hippodrome_horse(const figure *f, int x, int y)
} else {
y -= 12;
}
break;
case DIR_4_BOTTOM:
x += 20;
if (val <= 9) {
Expand Down

0 comments on commit ecc3a94

Please sign in to comment.