[vlc-devel] [PATCH] ccda: fix compiler warning

Tristan Matthews le.businessman at gmail.com
Mon Apr 12 16:24:32 UTC 2021


Hi,

On Mon, Apr 12, 2021 at 12:14 PM George Vaindirlis
<george.vdl1 at gmail.com> wrote:
>
> fix warning: ā€˜%uā€™ directive output may be truncated writing between 1 and 10 bytes into a region of size 5 [-Wformat-truncation=]
>
> ---
>  modules/access/cdda.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/access/cdda.c b/modules/access/cdda.c
> index 9260b833ed..bd82bbd27e 100644
> --- a/modules/access/cdda.c
> +++ b/modules/access/cdda.c
> @@ -635,7 +635,7 @@ static void AccessGetMeta(stream_t *access, vlc_meta_t *meta)
>              vlc_meta_SetGenre(meta, str);
>
>          const unsigned year = cddb_disc_get_year(sys->cddb);
> -        if (year != 0)
> +        if (year != 0 && year < 1000)

Maybe I'm missing something but won't this break for all but early
medieval music?

Best,
-t


More information about the vlc-devel mailing list