]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix a few "old-style-declaration" warnings in gcc.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Mon, 17 Sep 2018 16:17:24 +0000 (17:17 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 20 Sep 2018 12:49:41 +0000 (14:49 +0200)
Mainly needing to put "static" first and "__thread" earlier.

12 files changed:
src/descrambler/caid.c
src/dvr/dvr_rec.c
src/epg.c
src/htsp_server.c
src/http.c
src/input/mpegts/dvb.h
src/input/mpegts/dvb_support.c
src/input/mpegts/mpegts_input.c
src/intlconv.c
src/parsers/parsers.c
src/profile.c
src/prop.c

index fb9994ead648c5f8d42bef2f1b025d90db106b3c..e55e67abcfdf1a53e3289d430e65211eb015c6a9 100644 (file)
@@ -79,7 +79,7 @@ const char *
 caid2name(uint16_t caid)
 {
   const char *s = NULL;
-  static char __thread buf[20];
+  static __thread char buf[20];
   struct caid_tab *tab;
   int i;
 
index 38de733115a61eed686e62d02c11b5e55c40b7dc..bda175e42d68b6ce7eb23561b60aaf3db0c1f47b 100644 (file)
@@ -47,7 +47,7 @@ static void *dvr_thread(void *aux);
 static void dvr_thread_epilog(dvr_entry_t *de, const char *dvr_postproc);
 
 
-const static int prio2weight[6] = {
+static const int prio2weight[6] = {
   [DVR_PRIO_IMPORTANT]   = 500,
   [DVR_PRIO_HIGH]        = 400,
   [DVR_PRIO_NORMAL]      = 300,
index c26c913bbdb4971198e54d90a54dd67f376669f4..f6dc3c6dc0ae79abc2c4be411dfa94e38f0b7435 100644 (file)
--- a/src/epg.c
+++ b/src/epg.c
@@ -2471,7 +2471,7 @@ static const char **_epg_genre_names[16][16] = {
 
 static const char *_genre_get_name(int a, int b, const char *lang)
 {
-  static char __thread name[64];
+  static __thread char name[64];
   size_t l = 0;
   const char **p = _epg_genre_names[a][b];
   name[0] = '\0';
index 21148984c527838d93c69dc0f6ba3425b305c715..f349543e8ae9f46fe12c8d81f456949ed540be73 100644 (file)
@@ -3890,7 +3890,7 @@ htsp_event_delete(epg_broadcast_t *ebc)
   htsp_async_send(m, HTSP_ASYNC_EPG, HTSP_ASYNC_AUX_EPG, ebc);
 }
 
-const static char frametypearray[PKT_NTYPES] = {
+static const char frametypearray[PKT_NTYPES] = {
   [PKT_I_FRAME] = 'I',
   [PKT_P_FRAME] = 'P',
   [PKT_B_FRAME] = 'B',
index 1a0081f79c0347d62f1a9b33bb8a41ef20a251de..48c873681b8dad392d6d535336ab3da68ee1784e 100644 (file)
@@ -1397,7 +1397,7 @@ http_arg_get(struct http_arg_list *list, const char *name)
 char *
 http_arg_get_remove(struct http_arg_list *list, const char *name)
 {
-  static char __thread buf[128];
+  static __thread char buf[128];
   int empty;
   http_arg_t *ra;
   TAILQ_FOREACH(ra, list, link)
index 3dae001bdec9669de286faa130c85d8db078fb58..2b5533564a2cc204aa54c00ca425e6042227e1dc 100644 (file)
@@ -670,7 +670,7 @@ int dvb_mux_conf_str ( dvb_mux_conf_t *conf, char *buf, size_t bufsize );
 
 const char *dvb_sat_position_to_str( int position, char *buf, size_t buflen );
 
-const int dvb_sat_position_from_str( const char *buf );
+int dvb_sat_position_from_str( const char *buf );
 
 static inline int dvb_modulation_is_none_or_auto ( int modulation )
 {
index 569d209e43abc9e17cfdebe44cb7439e490854b9..5641464e60569e3a4bf2630b62d4f1ed3f63c8e8 100644 (file)
@@ -655,7 +655,7 @@ static int dvb_verify(int val, int *table)
 
 const char *dvb_rolloff2str(int p)
 {
-  static char __thread buf[16];
+  static __thread char buf[16];
   const char *res = dvb_common2str(p);
   if (res)
     return res;
@@ -677,7 +677,7 @@ int dvb_str2rolloff(const char *p)
   return dvb_verify(atoi(p) * 10, rolloff_table);
 }
 
-const static struct strtab delsystab[] = {
+static const struct strtab delsystab[] = {
   { "NONE",         DVB_SYS_NONE },
   { "DVB-C",        DVB_SYS_DVBC_ANNEX_A },
   { "DVBC/ANNEX_A", DVB_SYS_DVBC_ANNEX_A },
@@ -755,7 +755,7 @@ dvb_delsys2type ( mpegts_network_t *ln, dvb_fe_delivery_system_t delsys )
 
 const char *dvb_fec2str(int p)
 {
-  static char __thread buf[16];
+  static __thread char buf[16];
   const char *res = dvb_common2str(p);
   if (res)
     return res;
@@ -811,7 +811,7 @@ int dvb_str2fec(const char *p)
   return dvb_verify(hi * 100 + lo, fec_table);
 }
 
-const static struct strtab qamtab[] = {
+static const struct strtab qamtab[] = {
   { "NONE",      DVB_MOD_NONE },
   { "AUTO",      DVB_MOD_AUTO },
   { "QPSK",      DVB_MOD_QPSK },
@@ -853,7 +853,7 @@ dvb_str2val(qam);
 
 const char *dvb_bw2str(int p)
 {
-  static char __thread buf[17];
+  static __thread char buf[17];
   const char *res = dvb_common2str(p);
   if (res)
     return res;
@@ -887,7 +887,7 @@ int dvb_str2bw(const char *p)
   return dvb_verify(hi, bw_table);
 }
 
-const static struct strtab invertab[] = {
+static const struct strtab invertab[] = {
   { "NONE",  DVB_INVERSION_UNDEFINED },
   { "AUTO",  DVB_INVERSION_AUTO },
   { "ON",    DVB_INVERSION_ON },
@@ -895,7 +895,7 @@ const static struct strtab invertab[] = {
 };
 dvb_str2val(inver);
 
-const static struct strtab modetab[] = {
+static const struct strtab modetab[] = {
   { "NONE",  DVB_TRANSMISSION_MODE_NONE },
   { "AUTO",  DVB_TRANSMISSION_MODE_AUTO },
   { "1k",    DVB_TRANSMISSION_MODE_1K },
@@ -909,7 +909,7 @@ const static struct strtab modetab[] = {
 };
 dvb_str2val(mode);
 
-const static struct strtab guardtab[] = {
+static const struct strtab guardtab[] = {
   { "NONE",   DVB_GUARD_INTERVAL_NONE },
   { "AUTO",   DVB_GUARD_INTERVAL_AUTO },
   { "1/4",    DVB_GUARD_INTERVAL_1_4 },
@@ -925,7 +925,7 @@ const static struct strtab guardtab[] = {
 };
 dvb_str2val(guard);
 
-const static struct strtab hiertab[] = {
+static const struct strtab hiertab[] = {
   { "NONE", DVB_HIERARCHY_NONE },
   { "AUTO", DVB_HIERARCHY_AUTO },
   { "1",    DVB_HIERARCHY_1 },
@@ -934,7 +934,7 @@ const static struct strtab hiertab[] = {
 };
 dvb_str2val(hier);
 
-const static struct strtab poltab[] = {
+static const struct strtab poltab[] = {
   { "V", DVB_POLARISATION_VERTICAL },
   { "H", DVB_POLARISATION_HORIZONTAL },
   { "L", DVB_POLARISATION_CIRCULAR_LEFT },
@@ -943,7 +943,7 @@ const static struct strtab poltab[] = {
 };
 dvb_str2val(pol);
 
-const static struct strtab typetab[] = {
+static const struct strtab typetab[] = {
   {"DVB-T",  DVB_TYPE_T},
   {"DVB-C",  DVB_TYPE_C},
   {"DVB-S",  DVB_TYPE_S},
@@ -965,7 +965,7 @@ const static struct strtab typetab[] = {
 };
 dvb_str2val(type);
 
-const static struct strtab pilottab[] = {
+static const struct strtab pilottab[] = {
   {"NONE", DVB_PILOT_NONE},
   {"AUTO", DVB_PILOT_AUTO},
   {"ON",   DVB_PILOT_ON},
@@ -973,7 +973,7 @@ const static struct strtab pilottab[] = {
 };
 dvb_str2val(pilot);
 
-const static struct strtab plsmodetab[] = {
+static const struct strtab plsmodetab[] = {
   {"ROOT", DVB_PLS_ROOT},
   {"GOLD", DVB_PLS_GOLD},
   {"COMBO", DVB_PLS_COMBO},
@@ -1144,7 +1144,7 @@ dvb_sat_position_to_str(int position, char *buf, size_t buflen)
   return buf;
 }
 
-const int
+int
 dvb_sat_position_from_str( const char *buf )
 {
   const char *s = buf;
index 01e45e65e5a15e35067bf1d68a4945c77338ffa1..e68d7c31e7f1446c99ee579f363f2eccb0dc113a 100644 (file)
@@ -1037,7 +1037,7 @@ static int data_noise ( mpegts_packet_t *mp )
 static inline int data_noise( mpegts_packet_t *mp ) { return 0; }
 #endif
 
-static int inline
+static inline int
 get_pcr ( const uint8_t *tsb, int64_t *rpcr )
 {
   int_fast64_t pcr;
@@ -1059,7 +1059,7 @@ get_pcr ( const uint8_t *tsb, int64_t *rpcr )
   return 1;
 }
 
-static int inline
+static inline int
 ts_sync_count ( const uint8_t *tsb, int len )
 {
   const uint8_t *start = tsb;
index 3f230f34fc777026a8591f03bacfc0ac2ea35cef..d13179d8b8df4e1118fa5f13bc53f1fc8762df6c 100644 (file)
@@ -74,7 +74,7 @@ intlconv_charset_id( const char *charset,
                      int transil,
                      int ignore_bad_chars )
 {
-  static char __thread buf[128];
+  static __thread char buf[128];
   const char *delim;
 
   if (charset == NULL || charset[0] == '\0' ||
index 90e41cf65fc13c5727d86cc85736ed6560ddb35c..f5f7d4764c90d2955ff35bc8bb8afd8b863e1a80 100644 (file)
@@ -615,7 +615,7 @@ static void parse_mp4a_data(service_t *t, elementary_stream_t *st,
   }
 }
 
-const static int mpa_br[2][3][16] = {
+static const int mpa_br[2][3][16] = {
 {
   {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 0},
   {0, 32, 48, 56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, 384, 0},
@@ -628,8 +628,8 @@ const static int mpa_br[2][3][16] = {
 }
 };
 
-const static int mpa_sr[4]  = {44100, 48000, 32000, 0};
-const static int mpa_sri[4] = {4,     3,     5,     0};
+static const int mpa_sr[4]  = {44100, 48000, 32000, 0};
+static const int mpa_sri[4] = {4,     3,     5,     0};
 
 static inline int
 mpa_valid_frame(uint32_t h)
@@ -733,9 +733,9 @@ parse_mpa(service_t *t, elementary_stream_t *st, size_t ilen,
 /**
  * (E)AC3 audio parser
  */
-const static int ac3_freq_tab[4] = {48000, 44100, 32000, 0};
+static const int ac3_freq_tab[4] = {48000, 44100, 32000, 0};
 
-const static uint16_t ac3_frame_size_tab[38][3] = {
+static const uint16_t ac3_frame_size_tab[38][3] = {
     { 64,   69,   96   },
     { 64,   70,   96   },
     { 80,   87,   120  },
index 84fb7edfa5ebca2fa652724050548be951892c48..fe0aea92c0c1c2b815a8f60cd9f10a7e1a0c1984 100644 (file)
@@ -945,7 +945,7 @@ profile_chain_raw_open(profile_chain_t *prch, void *id, size_t qsize, int muxer)
  *
  */
 
-const static int prio2weight[] = {
+static const int prio2weight[] = {
   [PROFILE_SPRIO_DVR_IMPORTANT]   = 525,
   [PROFILE_SPRIO_DVR_HIGH]        = 425,
   [PROFILE_SPRIO_DVR_NORMAL]      = 325,
index ce78c57688ecce75b30e6b2e92aea425cadd76a9..444dbb39b9e2d4dbc0c40e34a1c141ddc1271e2a 100644 (file)
@@ -36,7 +36,7 @@ const char *prop_ptr;
 /**
  *
  */
-const static struct strtab typetab[] = {
+static const struct strtab typetab[] = {
   { "bool",    PT_BOOL },
   { "int",     PT_INT },
   { "str",     PT_STR },