From b323869ad8d26ff26427a6f443a99679ade2dfde Mon Sep 17 00:00:00 2001 From: Martijn van Beurden Date: Fri, 7 Feb 2025 11:04:22 +0100 Subject: [PATCH] Fix some compiler warnings --- src/libFLAC/ogg_decoder_aspect.c | 2 +- src/test_seeking/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libFLAC/ogg_decoder_aspect.c b/src/libFLAC/ogg_decoder_aspect.c index da9ada952e..ae9649a9ec 100644 --- a/src/libFLAC/ogg_decoder_aspect.c +++ b/src/libFLAC/ogg_decoder_aspect.c @@ -89,7 +89,7 @@ static FLAC__OggDecoderAspectReadStatus process_page_(FLAC__OggDecoderAspect *as /* Check whether not FLAC. The next if is somewhat confusing: check * whether the length of the next page body agrees with the length * of a FLAC 'header' possibly contained in that page */ - if(aspect->working_page.body_len > 1 + FLAC__OGG_MAPPING_MAGIC_LENGTH && + if(aspect->working_page.body_len > (long)(1 + FLAC__OGG_MAPPING_MAGIC_LENGTH) && aspect->working_page.body[0] == FLAC__OGG_MAPPING_FIRST_HEADER_PACKET_TYPE && memcmp((&aspect->working_page.body) + 1, FLAC__OGG_MAPPING_MAGIC, FLAC__OGG_MAPPING_MAGIC_LENGTH)) { aspect->bos_flag_seen = true; diff --git a/src/test_seeking/main.c b/src/test_seeking/main.c index 6391fdf68b..fc5f3f22d1 100644 --- a/src/test_seeking/main.c +++ b/src/test_seeking/main.c @@ -322,7 +322,7 @@ static FLAC__bool seek_barrage(FLAC__bool is_ogg, const char *filename, FLAC__of if(total_samples > n) n = (long int)total_samples; - printf("file's total_samples is %" PRIu64 "\n", n); + printf("file's total_samples is %ld\n", n); /* if we don't have a total samples count, just guess based on the file size */ /* @@@ for is_ogg we should get it from last page's granulepos */