From 9291e3331276f809359b1235c6d7140e106e6ce2 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sat, 8 Dec 2018 00:33:07 +0100 Subject: [PATCH] Fix minor compiler warnings --- src/meta/bnk_sony.c | 3 +++ src/meta/txth.c | 2 +- src/meta/txtp.c | 4 ++-- src/vgmstream.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/meta/bnk_sony.c b/src/meta/bnk_sony.c index 1d4ac1a0..f7924cf0 100644 --- a/src/meta/bnk_sony.c +++ b/src/meta/bnk_sony.c @@ -396,6 +396,9 @@ VGMSTREAM * init_vgmstream_bnk_sony(STREAMFILE *streamFile) { vgmstream->loop_start_sample = loop_start; vgmstream->loop_end_sample = loop_end; break; + + default: + goto fail; } if (name_offset) diff --git a/src/meta/txth.c b/src/meta/txth.c index 00978529..04e5fb4c 100644 --- a/src/meta/txth.c +++ b/src/meta/txth.c @@ -808,7 +808,7 @@ static int parse_num(STREAMFILE * streamFile, txth_header * txth, const char * v if (sscanf(val, hex ? "@%x" : "@%u", &offset) != 1) goto fail; } - if (offset < 0 || offset > get_streamfile_size(streamFile)) + if (/*offset < 0 ||*/ offset > get_streamfile_size(streamFile)) goto fail; if (ed1 == 'B' && ed2 == 'E') diff --git a/src/meta/txtp.c b/src/meta/txtp.c index ddb2ac05..fce903dc 100644 --- a/src/meta/txtp.c +++ b/src/meta/txtp.c @@ -25,8 +25,8 @@ typedef struct { size_t entry_count; size_t entry_max; - size_t loop_start_segment; - size_t loop_end_segment; + uint32_t loop_start_segment; + uint32_t loop_end_segment; size_t is_layered; } txtp_header; diff --git a/src/vgmstream.c b/src/vgmstream.c index f896a656..7eeff724 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -2188,7 +2188,7 @@ int vgmstream_do_loop(VGMSTREAM * vgmstream) { /* Write a description of the stream into array pointed by desc, which must be length bytes long. * Will always be null-terminated if length > 0 */ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) { -#define TEMPSIZE 256 +#define TEMPSIZE (256+32) char temp[TEMPSIZE]; const char* description;