CTR: Silence a couple of GCC 14 warnings
This commit is contained in:
parent
51b13fc58c
commit
fc9f0b04be
|
@ -825,12 +825,8 @@ static void ctr_update_state_date(void *data)
|
||||||
static bool ctr_update_state_date_from_file(void *data)
|
static bool ctr_update_state_date_from_file(void *data)
|
||||||
{
|
{
|
||||||
char state_path[PATH_MAX_LENGTH];
|
char state_path[PATH_MAX_LENGTH];
|
||||||
#ifdef USE_CTRULIB_2
|
|
||||||
time_t mtime;
|
|
||||||
#else
|
|
||||||
time_t ft;
|
|
||||||
u64 mtime;
|
u64 mtime;
|
||||||
#endif
|
time_t ft;
|
||||||
struct tm *t = NULL;
|
struct tm *t = NULL;
|
||||||
ctr_video_t *ctr = (ctr_video_t*)data;
|
ctr_video_t *ctr = (ctr_video_t*)data;
|
||||||
|
|
||||||
|
@ -848,12 +844,8 @@ static bool ctr_update_state_date_from_file(void *data)
|
||||||
|
|
||||||
ctr->state_data_exist = true;
|
ctr->state_data_exist = true;
|
||||||
|
|
||||||
#ifdef USE_CTRULIB_2
|
|
||||||
t = localtime(&mtime);
|
|
||||||
#else
|
|
||||||
ft = mtime;
|
ft = mtime;
|
||||||
t = localtime(&ft);
|
t = localtime(&ft);
|
||||||
#endif
|
|
||||||
snprintf(ctr->state_date, sizeof(ctr->state_date), "%02d/%02d/%d",
|
snprintf(ctr->state_date, sizeof(ctr->state_date), "%02d/%02d/%d",
|
||||||
t->tm_mon + 1, t->tm_mday, t->tm_year + 1900);
|
t->tm_mon + 1, t->tm_mday, t->tm_year + 1900);
|
||||||
|
|
||||||
|
|
|
@ -89,13 +89,13 @@ typedef struct
|
||||||
|
|
||||||
void font_driver_bind_block(void *font_data, void *block);
|
void font_driver_bind_block(void *font_data, void *block);
|
||||||
|
|
||||||
static void INLINE font_bind(font_data_impl_t *font_data)
|
static INLINE void font_bind(font_data_impl_t *font_data)
|
||||||
{
|
{
|
||||||
font_driver_bind_block(font_data->font, &font_data->raster_block);
|
font_driver_bind_block(font_data->font, &font_data->raster_block);
|
||||||
font_data->raster_block.carr.coords.vertices = 0;
|
font_data->raster_block.carr.coords.vertices = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void INLINE font_unbind(font_data_impl_t *font_data)
|
static INLINE void font_unbind(font_data_impl_t *font_data)
|
||||||
{
|
{
|
||||||
font_driver_bind_block(font_data->font, NULL);
|
font_driver_bind_block(font_data->font, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
static dispgfx_widget_t dispwidget_st = {0}; /* uint64_t alignment */
|
static dispgfx_widget_t dispwidget_st = {0}; /* uint64_t alignment */
|
||||||
|
|
||||||
/* Widgets list */
|
/* Widgets list */
|
||||||
const static gfx_widget_t* const widgets[] = {
|
static const gfx_widget_t* const widgets[] = {
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
&gfx_widget_netplay_chat,
|
&gfx_widget_netplay_chat,
|
||||||
&gfx_widget_netplay_ping,
|
&gfx_widget_netplay_ping,
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ video_pixel_scaler_t *video_driver_pixel_converter_init(
|
||||||
if (!scaler_ctx_gen_filter(scalr_ctx))
|
if (!scaler_ctx_gen_filter(scalr_ctx))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (!(scalr_out = calloc(sizeof(uint16_t), size * size)))
|
if (!(scalr_out = calloc(size * size, sizeof(uint16_t))))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
scalr->scaler_out = scalr_out;
|
scalr->scaler_out = scalr_out;
|
||||||
|
|
|
@ -29,10 +29,10 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <encodings/base64.h>
|
#include <encodings/base64.h>
|
||||||
|
|
||||||
const static char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
static const char* b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
|
|
||||||
/* maps A=>0,B=>1.. */
|
/* maps A=>0,B=>1.. */
|
||||||
const static unsigned char unb64[]={
|
static const unsigned char unb64[]={
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
|
@ -36,8 +36,9 @@ static bool allocate_frames(struct scaler_ctx *ctx)
|
||||||
ctx->scaled.stride = ((ctx->out_width + 7) & ~7) * sizeof(uint64_t);
|
ctx->scaled.stride = ((ctx->out_width + 7) & ~7) * sizeof(uint64_t);
|
||||||
ctx->scaled.width = ctx->out_width;
|
ctx->scaled.width = ctx->out_width;
|
||||||
ctx->scaled.height = ctx->in_height;
|
ctx->scaled.height = ctx->in_height;
|
||||||
scaled_frame = (uint64_t*)calloc(sizeof(uint64_t),
|
scaled_frame = (uint64_t*)calloc(
|
||||||
(ctx->scaled.stride * ctx->scaled.height) >> 3);
|
(ctx->scaled.stride * ctx->scaled.height) >> 3,
|
||||||
|
sizeof(uint64_t));
|
||||||
|
|
||||||
if (!scaled_frame)
|
if (!scaled_frame)
|
||||||
return false;
|
return false;
|
||||||
|
@ -48,8 +49,9 @@ static bool allocate_frames(struct scaler_ctx *ctx)
|
||||||
{
|
{
|
||||||
uint32_t *input_frame = NULL;
|
uint32_t *input_frame = NULL;
|
||||||
ctx->input.stride = ((ctx->in_width + 7) & ~7) * sizeof(uint32_t);
|
ctx->input.stride = ((ctx->in_width + 7) & ~7) * sizeof(uint32_t);
|
||||||
input_frame = (uint32_t*)calloc(sizeof(uint32_t),
|
input_frame = (uint32_t*)calloc(
|
||||||
(ctx->input.stride * ctx->in_height) >> 2);
|
(ctx->input.stride * ctx->in_height) >> 2,
|
||||||
|
sizeof(uint32_t));
|
||||||
|
|
||||||
if (!input_frame)
|
if (!input_frame)
|
||||||
return false;
|
return false;
|
||||||
|
@ -62,8 +64,9 @@ static bool allocate_frames(struct scaler_ctx *ctx)
|
||||||
uint32_t *output_frame = NULL;
|
uint32_t *output_frame = NULL;
|
||||||
ctx->output.stride = ((ctx->out_width + 7) & ~7) * sizeof(uint32_t);
|
ctx->output.stride = ((ctx->out_width + 7) & ~7) * sizeof(uint32_t);
|
||||||
|
|
||||||
output_frame = (uint32_t*)calloc(sizeof(uint32_t),
|
output_frame = (uint32_t*)calloc(
|
||||||
(ctx->output.stride * ctx->out_height) >> 2);
|
(ctx->output.stride * ctx->out_height) >> 2,
|
||||||
|
sizeof(uint32_t));
|
||||||
|
|
||||||
if (!output_frame)
|
if (!output_frame)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -189,11 +189,11 @@ bool scaler_gen_filter(struct scaler_ctx *ctx)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->horiz.filter = (int16_t*)calloc(sizeof(int16_t), ctx->horiz.filter_stride * ctx->out_width);
|
ctx->horiz.filter = (int16_t*)calloc(ctx->horiz.filter_stride * ctx->out_width, sizeof(int16_t));
|
||||||
ctx->horiz.filter_pos = (int*)calloc(sizeof(int), ctx->out_width);
|
ctx->horiz.filter_pos = (int*)calloc(ctx->out_width, sizeof(int));
|
||||||
|
|
||||||
ctx->vert.filter = (int16_t*)calloc(sizeof(int16_t), ctx->vert.filter_stride * ctx->out_height);
|
ctx->vert.filter = (int16_t*)calloc(ctx->vert.filter_stride * ctx->out_height, sizeof(int16_t));
|
||||||
ctx->vert.filter_pos = (int*)calloc(sizeof(int), ctx->out_height);
|
ctx->vert.filter_pos = (int*)calloc(ctx->out_height, sizeof(int));
|
||||||
|
|
||||||
if (!ctx->horiz.filter || !ctx->vert.filter)
|
if (!ctx->horiz.filter || !ctx->vert.filter)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -525,6 +525,7 @@ static int action_get_title_dropdown_input_description_common(
|
||||||
const char *input_label_ptr = input_name;
|
const char *input_label_ptr = input_name;
|
||||||
char input_label[NAME_MAX_LENGTH];
|
char input_label[NAME_MAX_LENGTH];
|
||||||
|
|
||||||
|
input_label[0] = '\0';
|
||||||
if (!string_is_empty(input_label_ptr))
|
if (!string_is_empty(input_label_ptr))
|
||||||
{
|
{
|
||||||
/* Strip off 'Auto:' prefix, if required */
|
/* Strip off 'Auto:' prefix, if required */
|
||||||
|
|
|
@ -1839,7 +1839,7 @@ static void rgui_render_border(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns true if particle is on screen */
|
/* Returns true if particle is on screen */
|
||||||
static bool INLINE rgui_draw_particle(
|
static INLINE bool rgui_draw_particle(
|
||||||
uint16_t *data,
|
uint16_t *data,
|
||||||
unsigned fb_width,
|
unsigned fb_width,
|
||||||
unsigned fb_height,
|
unsigned fb_height,
|
||||||
|
@ -2812,7 +2812,7 @@ static void rgui_render_fs_thumbnail(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned INLINE rgui_get_mini_thumbnail_fullwidth(rgui_t *rgui)
|
static INLINE unsigned rgui_get_mini_thumbnail_fullwidth(rgui_t *rgui)
|
||||||
{
|
{
|
||||||
unsigned width = rgui->mini_thumbnail.is_valid ? rgui->mini_thumbnail.width : 0;
|
unsigned width = rgui->mini_thumbnail.is_valid ? rgui->mini_thumbnail.width : 0;
|
||||||
unsigned left_width = rgui->mini_left_thumbnail.is_valid ? rgui->mini_left_thumbnail.width : 0;
|
unsigned left_width = rgui->mini_left_thumbnail.is_valid ? rgui->mini_left_thumbnail.width : 0;
|
||||||
|
|
|
@ -5558,7 +5558,7 @@ static void xmb_show_fullscreen_thumbnails(
|
||||||
xmb_set_thumbnail_delay(false);
|
xmb_set_thumbnail_delay(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool INLINE xmb_fullscreen_thumbnails_available(xmb_handle_t *xmb,
|
static INLINE bool xmb_fullscreen_thumbnails_available(xmb_handle_t *xmb,
|
||||||
struct menu_state *menu_st)
|
struct menu_state *menu_st)
|
||||||
{
|
{
|
||||||
bool ret = xmb->fullscreen_thumbnails_available
|
bool ret = xmb->fullscreen_thumbnails_available
|
||||||
|
|
|
@ -5186,6 +5186,7 @@ static size_t setting_get_string_representation_uint_video_3ds_display_mode(
|
||||||
len);
|
len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue