[vlc-devel] [PATCH] jack: fix truncation warning

Alexandre Janniaux ajanni at videolabs.io
Wed Aug 28 23:19:16 CEST 2019


Hi,

Thank you for the review,

> Shouldn't this use var_LocationParse() ?

I don't know, I just fixed the warning while it was compiling. Feel free to
provide an alternative patch if you think it's better.

Greats,
--
Alexandre Janniaux
VideoLabs

On Wed, Aug 28, 2019 at 08:39:02PM +0300, Rémi Denis-Courmont wrote:
> Le keskiviikkona 28. elokuuta 2019, 19.39.55 EEST Alexandre Janniaux a écrit :
> > ---
> >  modules/access/jack.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/modules/access/jack.c b/modules/access/jack.c
> > index 64e8fc2557..7d41c665ae 100644
> > --- a/modules/access/jack.c
> > +++ b/modules/access/jack.c
> > @@ -529,7 +529,7 @@ static void Parse( demux_t *p_demux )
> >
> >      if( !strncmp( psz_parser, "channels=", strlen( "channels=" ) ) )
> >      {
> > -        p_sys->i_channels = abs( strtol( psz_parser + strlen( "channels="
> > ), +        p_sys->i_channels = labs( strtol( psz_parser + strlen(
> > "channels=" ), &psz_parser, 0 ) );
> >      }
> >      else if( !strncmp( psz_parser, "ports=", strlen( "ports=" ) ) )
> > @@ -564,7 +564,7 @@ static void Parse( demux_t *p_demux )
> >              *psz_parser++ = '\0';
> >              if( !strncmp( psz_parser, "channels=", strlen( "channels=" ) )
> > ) {
> > -                p_sys->i_channels = abs( strtol(
> > +                p_sys->i_channels = labs( strtol(
> >                      psz_parser + strlen( "channels=" ), &psz_parser, 0 ) );
> > }
> >              else if( !strncmp( psz_parser, "ports=", strlen( "ports=" ) ) )
>
> Shouldn't this use var_LocationParse() ?
>
> --
> Rémi
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list