[vlc-devel] [PATCH] demux: mp4: avoid -Wformat warning with intermediate variable
Alexandre Janniaux
ajanni at videolabs.io
Mon May 4 19:39:02 CEST 2020
---
modules/demux/mp4/attachments.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mp4/attachments.c b/modules/demux/mp4/attachments.c
index 59db7bb22bf..8376dbad053 100644
--- a/modules/demux/mp4/attachments.c
+++ b/modules/demux/mp4/attachments.c
@@ -315,10 +315,10 @@ int MP4_GetAttachments( const MP4_Box_t *p_root, input_attachment_t ***ppp_attac
if ( asprintf( &psz_location, "pnot[%u]", i_index - 1 ) > -1 )
{
char rgz_path[14];
+ uint16_t index = p_pnot->data.p_pnot->i_index - 1;
snprintf( rgz_path, 14,
"/%4.4s[%"PRIu16"]",
- (const char *) &p_pnot->data.p_pnot->i_type,
- p_pnot->data.p_pnot->i_index - 1 );
+ (const char *) &p_pnot->data.p_pnot->i_type, index );
const MP4_Box_t *p_pict = MP4_BoxGet( p_root, rgz_path );
if( p_pict )
{
--
2.26.2
More information about the vlc-devel
mailing list