[dvblast-devel] [PATCH] Fix bunch of warnings about GNU extension under clang.

Georgi Chorbadzhiyski gf at unixsol.org
Wed Apr 17 10:41:56 CEST 2013


On 4/17/13 10:40 AM, Zoran Turalija wrote:
> Clang complaints are like:
> ./dvblast.h:136:22: warning: field 'raw_pkt_header' with variable sized type
>       'struct udprawpkt' not at the end of a struct or class is a GNU extension
>       [-Wgnu]
>     struct udprawpkt raw_pkt_header;
>                      ^
> ---
>  dvblast.h |   16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/dvblast.h b/dvblast.h
> index eb7f9d3..89c94c0 100644
> --- a/dvblast.h
> +++ b/dvblast.h
> @@ -127,14 +127,6 @@ typedef struct output_t
>  {
>      output_config_t config;
>  
> -    /* output */
> -    int i_handle;
> -    packet_t *p_packets, *p_last_packet;
> -    struct udprawpkt raw_pkt_header;
> -    uint16_t i_seqnum;
> -    mtime_t i_ref_timestamp;
> -    mtime_t i_ref_wallclock;
> -
>      /* demux */
>      int i_nb_errors;
>      mtime_t i_last_error;
> @@ -157,6 +149,14 @@ typedef struct output_t
>      /* For pidmap from config file */
>      bool b_do_remap;
>      uint16_t pi_confpids[N_MAP_PIDS];
> +
> +    /* output */
> +    int i_handle;
> +    packet_t *p_packets, *p_last_packet;
> +    uint16_t i_seqnum;
> +    mtime_t i_ref_timestamp;
> +    mtime_t i_ref_wallclock;
> +    struct udprawpkt raw_pkt_header;
>  } output_t;
>  
>  typedef struct ts_pid_info {
> 

Why don't you move just the struct? Moving other variables seems unnecessary.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
http://github.com/gfto/


More information about the dvblast-devel mailing list