[vlc-devel] [vlc-commits] itml: fix the printf modifier for the pointer value
Filip Roséen
filip at atch.se
Wed Jul 11 11:03:06 CEST 2018
Hi Steve,
On 2018-07-11 08:52, Steve Lhomme wrote:
> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jul 11 10:37:26 2018 +0200| [0e1886330f19fce5cdc47e6369ede560bdacaf72] | committer: Steve Lhomme
>
> itml: fix the printf modifier for the pointer value
>
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0e1886330f19fce5cdc47e6369ede560bdacaf72
> ---
>
> modules/demux/playlist/itml.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/modules/demux/playlist/itml.c b/modules/demux/playlist/itml.c
> index 449876f2d0..bb66765c19 100644
> --- a/modules/demux/playlist/itml.c
> +++ b/modules/demux/playlist/itml.c
> @@ -282,8 +282,8 @@ static bool parse_tracks_dict( stream_t *p_demux, input_item_node_t *p_input_nod
> parse_dict( p_demux, p_input_node, NULL, p_xml_reader,
> "dict", tracks_elements );
>
> - msg_Info( p_demux, "added %zi tracks successfully",
> - (size_t)p_demux->p_sys );
> + msg_Info( p_demux, "added %" PRIiPTR " tracks successfully",
> + p_demux->p_sys );
Even though the previous implementation was not correct (as the
bit-representation in `p_demux->p_sys` is a `uintptr_t` and not
`size_t`), this change is still in the wrong - and I must assume that
you got a warning from compiling the above.
A cast to `uintptr_t` is necessary, and the format-specifier should be
using `PRIuPTR`. Though, it is certainly debatable whether `uintptr_t`
should be used in the code at all.
>
> return true;
> }
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180711/6d41f1fb/attachment.html>
More information about the vlc-devel
mailing list