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

Zoran Turalija zoran.turalija at gmail.com
Wed Apr 17 09:40:26 CEST 2013


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 {
-- 
1.7.10.4


-- 
Kind regards,
Zoran Turalija


More information about the dvblast-devel mailing list