[vlc-devel] [PATCH] codec/telx: Fix warning

Thomas Guillem thomas at gllm.fr
Thu Nov 7 10:04:54 CET 2019


Hello,

Alexandre already proposed this patch last week, cf. https://mailman.videolan.org/pipermail/vlc-devel/2019-October/129208.html

It's not yet merged since I was waiting for a cleaner fix that is:

#ifdef TELX_DEBUG
#   define dbg( a ) msg_Dbg a
#else
-#   define dbg( a ) 
+#   define dbg( a ) (void)
#endif

Like it is done for assert()

On Thu, Nov 7, 2019, at 00:22, Johan Gunnarsson wrote:
> The dbg macro may compile to nothing depending other defines, so better put
> this if body within braces.
> 
> codec/telx.c: In function ‘Decode’:
> codec/telx.c:686:81: warning: suggest braces around empty body in an ‘if’
> statement [-Wempty-body]
> (long int)(p_sys->prev_pts+1500000)));
>                                      ^
> ---
>  modules/codec/telx.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/modules/codec/telx.c b/modules/codec/telx.c
> index 8446e1a5f4..6e9860308f 100644
> --- a/modules/codec/telx.c
> +++ b/modules/codec/telx.c
> @@ -682,8 +682,10 @@ static int Decode( decoder_t *p_dec, block_t 
> *p_block )
>              /* row 0 : flags and header line */
>              b_update |= DecodePageHeaderPacket( p_dec, packet, 
> magazine );
>              if( b_update )
> +            {
>                  dbg((p_dec, "%ld --> %ld", (long int) p_block->i_pts,
>                                             (long 
> int)(p_sys->prev_pts+1500000)));
> +            }
>          }
>          else if ( row < 26 ) /* Normal Packet */
>          {
> -- 
> 2.17.1
> 
> _______________________________________________
> 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