Skip to content

Commit 22afccb

Browse files
committed
Small batch of warning fixes
1 parent a74b8d0 commit 22afccb

7 files changed

Lines changed: 14 additions & 7 deletions

File tree

command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ bool command_seek_replay(command_t *cmd, const char *arg)
826826
{
827827
_len = strlcpy(reply, "OK ", sizeof(reply));
828828
_len += snprintf(reply+_len, sizeof(reply)-_len,
829-
"%lld", input_st->bsv_movie_state.seek_target_frame);
829+
"%" PRId64, input_st->bsv_movie_state.seek_target_frame);
830830
}
831831
else
832832
_len = strlcpy(reply, "NO", sizeof(reply));

deps/glslang/glslang/glslang/MachineIndependent/SymbolTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ TVariable* TVariable::clone() const
308308
TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
309309
{
310310
for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) {
311-
TParameter param;
311+
TParameter param = {nullptr, nullptr, nullptr};
312312
parameters.push_back(param);
313313
parameters.back().copyParam(copyOf.parameters[i]);
314314
}

deps/xdelta3/xdelta3-djw.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,10 @@ djw_decode_1_2 (xd3_stream *stream,
15581558
* we already know the zero frequencies. */
15591559
if (skip_offset != 0 && n >= skip_offset && values[n-skip_offset] == 0)
15601560
{
1561+
/* This diagnostic is triggering on GCC 13.3.0 because of the initial
1562+
* call to djw_decode_1_2 with clen[0], but that code path won't hit
1563+
* this branch. */
1564+
#pragma GCC diagnostic ignored "-Wstringop-overflow"
15611565
values[n++] = 0;
15621566
continue;
15631567
}

input/bsv/uint32s_index.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ uint32s_index_t *uint32s_index_new(size_t object_size, uint8_t commit_interval,
1717
uint32s_index_t *index = malloc(sizeof(uint32s_index_t));
1818
index->object_size = object_size;
1919
index->index = NULL;
20+
#pragma GCC diagnostic ignored "-Wtautological-compare"
2021
RHMAP_FIT(index->index, HASHMAP_CAP);
2122
index->objects = NULL;
2223
index->counts = NULL;
@@ -270,8 +271,8 @@ uint32_t *uint32s_index_get(uint32s_index_t *index, uint32_t which)
270271
void uint32s_index_pop(uint32s_index_t *index)
271272
{
272273
uint32_t idx = RBUF_LEN(index->objects)-1;
273-
uint32_t *object = RBUF_POP(index->objects);
274-
size_t size_bytes = index->object_size * sizeof(uint32_t);
274+
#pragma GCC diagnostic ignored "-Wunused-value"
275+
RBUF_POP(index->objects);
275276
uint32_t hash = index->hashes[idx];
276277
struct uint32s_bucket *bucket = RHMAP_PTR(index->index, hash);
277278
RBUF_RESIZE(index->counts, idx);

libretro-common/file/config_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ bool config_get_size_t(config_file_t *conf, const char *key, size_t *in)
10441044
if (entry)
10451045
{
10461046
size_t val = 0;
1047-
if (sscanf(entry->value, "%" PRI_SIZET, &val) == 1)
1047+
if (sscanf(entry->value, "%zu", &val) == 1)
10481048
{
10491049
*in = val;
10501050
return true;

libretro-common/include/retro_miscellaneous.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ typedef struct
510510
# endif
511511
#elif defined(PS2)
512512
# define PRI_SIZET "u"
513+
#elif defined(__emscripten__)
514+
# define PRI_SIZET "zu"
513515
#else
514516
# if (SIZE_MAX == 0xFFFF)
515517
# define PRI_SIZET "hu"

menu/menu_setting.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8005,8 +8005,8 @@ static size_t get_string_representation_input_device_reservation_type(
80058005
static size_t setting_get_string_representation_input_device_reserved_device_name(
80068006
rarch_setting_t *setting, char *s, size_t len)
80078007
{
8008-
int dev_vendor_id;
8009-
int dev_product_id;
8008+
unsigned int dev_vendor_id;
8009+
unsigned int dev_product_id;
80108010
if (!setting)
80118011
return 0;
80128012
if (string_is_empty(setting->value.target.string))

0 commit comments

Comments
 (0)