Skip to content

Commit bf3752e

Browse files
Merge pull request #17702 from pstef/silence-warnings-ctr
2 parents 98b1601 + fc9f0b0 commit bf3752e

11 files changed

Lines changed: 25 additions & 28 deletions

File tree

gfx/drivers/ctr_gfx.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -825,12 +825,8 @@ static void ctr_update_state_date(void *data)
825825
static bool ctr_update_state_date_from_file(void *data)
826826
{
827827
char state_path[PATH_MAX_LENGTH];
828-
#ifdef USE_CTRULIB_2
829-
time_t mtime;
830-
#else
831-
time_t ft;
832828
u64 mtime;
833-
#endif
829+
time_t ft;
834830
struct tm *t = NULL;
835831
ctr_video_t *ctr = (ctr_video_t*)data;
836832

@@ -848,12 +844,8 @@ static bool ctr_update_state_date_from_file(void *data)
848844

849845
ctr->state_data_exist = true;
850846

851-
#ifdef USE_CTRULIB_2
852-
t = localtime(&mtime);
853-
#else
854847
ft = mtime;
855848
t = localtime(&ft);
856-
#endif
857849
snprintf(ctr->state_date, sizeof(ctr->state_date), "%02d/%02d/%d",
858850
t->tm_mon + 1, t->tm_mday, t->tm_year + 1900);
859851

gfx/font_driver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ typedef struct
8989

9090
void font_driver_bind_block(void *font_data, void *block);
9191

92-
static void INLINE font_bind(font_data_impl_t *font_data)
92+
static INLINE void font_bind(font_data_impl_t *font_data)
9393
{
9494
font_driver_bind_block(font_data->font, &font_data->raster_block);
9595
font_data->raster_block.carr.coords.vertices = 0;
9696
}
9797

98-
static void INLINE font_unbind(font_data_impl_t *font_data)
98+
static INLINE void font_unbind(font_data_impl_t *font_data)
9999
{
100100
font_driver_bind_block(font_data->font, NULL);
101101
}

gfx/gfx_widgets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
static dispgfx_widget_t dispwidget_st = {0}; /* uint64_t alignment */
4949

5050
/* Widgets list */
51-
const static gfx_widget_t* const widgets[] = {
51+
static const gfx_widget_t* const widgets[] = {
5252
#ifdef HAVE_NETWORKING
5353
&gfx_widget_netplay_chat,
5454
&gfx_widget_netplay_ping,

gfx/video_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ video_pixel_scaler_t *video_driver_pixel_converter_init(
10061006
if (!scaler_ctx_gen_filter(scalr_ctx))
10071007
goto error;
10081008

1009-
if (!(scalr_out = calloc(sizeof(uint16_t), size * size)))
1009+
if (!(scalr_out = calloc(size * size, sizeof(uint16_t))))
10101010
goto error;
10111011

10121012
scalr->scaler_out = scalr_out;

libretro-common/encodings/encoding_base64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
#include <stdlib.h>
3030
#include <encodings/base64.h>
3131

32-
const static char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
32+
static const char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
3333

3434
/* maps A=>0,B=>1.. */
35-
const static unsigned char unb64[]={
35+
static const unsigned char unb64[]={
3636
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3737
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3838
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

libretro-common/gfx/scaler/scaler.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ static bool allocate_frames(struct scaler_ctx *ctx)
3636
ctx->scaled.stride = ((ctx->out_width + 7) & ~7) * sizeof(uint64_t);
3737
ctx->scaled.width = ctx->out_width;
3838
ctx->scaled.height = ctx->in_height;
39-
scaled_frame = (uint64_t*)calloc(sizeof(uint64_t),
40-
(ctx->scaled.stride * ctx->scaled.height) >> 3);
39+
scaled_frame = (uint64_t*)calloc(
40+
(ctx->scaled.stride * ctx->scaled.height) >> 3,
41+
sizeof(uint64_t));
4142

4243
if (!scaled_frame)
4344
return false;
@@ -48,8 +49,9 @@ static bool allocate_frames(struct scaler_ctx *ctx)
4849
{
4950
uint32_t *input_frame = NULL;
5051
ctx->input.stride = ((ctx->in_width + 7) & ~7) * sizeof(uint32_t);
51-
input_frame = (uint32_t*)calloc(sizeof(uint32_t),
52-
(ctx->input.stride * ctx->in_height) >> 2);
52+
input_frame = (uint32_t*)calloc(
53+
(ctx->input.stride * ctx->in_height) >> 2,
54+
sizeof(uint32_t));
5355

5456
if (!input_frame)
5557
return false;
@@ -62,8 +64,9 @@ static bool allocate_frames(struct scaler_ctx *ctx)
6264
uint32_t *output_frame = NULL;
6365
ctx->output.stride = ((ctx->out_width + 7) & ~7) * sizeof(uint32_t);
6466

65-
output_frame = (uint32_t*)calloc(sizeof(uint32_t),
66-
(ctx->output.stride * ctx->out_height) >> 2);
67+
output_frame = (uint32_t*)calloc(
68+
(ctx->output.stride * ctx->out_height) >> 2,
69+
sizeof(uint32_t));
6770

6871
if (!output_frame)
6972
return false;

libretro-common/gfx/scaler/scaler_filter.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ bool scaler_gen_filter(struct scaler_ctx *ctx)
189189
return false;
190190
}
191191

192-
ctx->horiz.filter = (int16_t*)calloc(sizeof(int16_t), ctx->horiz.filter_stride * ctx->out_width);
193-
ctx->horiz.filter_pos = (int*)calloc(sizeof(int), ctx->out_width);
192+
ctx->horiz.filter = (int16_t*)calloc(ctx->horiz.filter_stride * ctx->out_width, sizeof(int16_t));
193+
ctx->horiz.filter_pos = (int*)calloc(ctx->out_width, sizeof(int));
194194

195-
ctx->vert.filter = (int16_t*)calloc(sizeof(int16_t), ctx->vert.filter_stride * ctx->out_height);
196-
ctx->vert.filter_pos = (int*)calloc(sizeof(int), ctx->out_height);
195+
ctx->vert.filter = (int16_t*)calloc(ctx->vert.filter_stride * ctx->out_height, sizeof(int16_t));
196+
ctx->vert.filter_pos = (int*)calloc(ctx->out_height, sizeof(int));
197197

198198
if (!ctx->horiz.filter || !ctx->vert.filter)
199199
return false;

menu/cbs/menu_cbs_title.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ static int action_get_title_dropdown_input_description_common(
525525
const char *input_label_ptr = input_name;
526526
char input_label[NAME_MAX_LENGTH];
527527

528+
input_label[0] = '\0';
528529
if (!string_is_empty(input_label_ptr))
529530
{
530531
/* Strip off 'Auto:' prefix, if required */

menu/drivers/rgui.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ static void rgui_render_border(
18391839
}
18401840

18411841
/* Returns true if particle is on screen */
1842-
static bool INLINE rgui_draw_particle(
1842+
static INLINE bool rgui_draw_particle(
18431843
uint16_t *data,
18441844
unsigned fb_width,
18451845
unsigned fb_height,
@@ -2812,7 +2812,7 @@ static void rgui_render_fs_thumbnail(
28122812
}
28132813
}
28142814

2815-
static unsigned INLINE rgui_get_mini_thumbnail_fullwidth(rgui_t *rgui)
2815+
static INLINE unsigned rgui_get_mini_thumbnail_fullwidth(rgui_t *rgui)
28162816
{
28172817
unsigned width = rgui->mini_thumbnail.is_valid ? rgui->mini_thumbnail.width : 0;
28182818
unsigned left_width = rgui->mini_left_thumbnail.is_valid ? rgui->mini_left_thumbnail.width : 0;

menu/drivers/xmb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5558,7 +5558,7 @@ static void xmb_show_fullscreen_thumbnails(
55585558
xmb_set_thumbnail_delay(false);
55595559
}
55605560

5561-
static bool INLINE xmb_fullscreen_thumbnails_available(xmb_handle_t *xmb,
5561+
static INLINE bool xmb_fullscreen_thumbnails_available(xmb_handle_t *xmb,
55625562
struct menu_state *menu_st)
55635563
{
55645564
bool ret = xmb->fullscreen_thumbnails_available

0 commit comments

Comments
 (0)