]> 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:30:04 +0000 (14:30 +0200)
Mainly needing to put "static" first and "__thread" earlier.

15 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/linuxdvb/linuxdvb_ddci.c
src/input/mpegts/mpegts_input.c
src/intlconv.c
src/parsers/parsers.c
src/profile.c
src/prop.c
src/transcoding/codec/codec.c
src/transcoding/codec/profile.c

index ff20be963de6c07f27f56d1fda0fd6725142f96f..fef27e9f1dc9386ec7416ce180946a035d385e05 100644 (file)
@@ -81,7 +81,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 c54db69582ce0d603e6b5caf4f94f7cc33706fa2..1190fc1c0722bed357cf3d7b6fcd9fd41cb91b4e 100644 (file)
@@ -48,7 +48,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 f7ad33f1ee4014f5cffddc169ca2f388d35193b4..e038dbd449f9484d76644b7d20df9291529ab066 100644 (file)
--- a/src/epg.c
+++ b/src/epg.c
@@ -1929,7 +1929,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 a873c4aa882dbacb996763d392f3fd81f977abdf..b82c8da4387cd4ca070d6e998901f6b5c3a0dd76 100644 (file)
@@ -3951,7 +3951,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 ba7097209f2ce68eb9b0a2bb16cbabe16cee8511..7407111f1e1e96005ea88d2098ff9a4aa96255c5 100644 (file)
@@ -1526,7 +1526,7 @@ http_arg_get(http_arg_list_t *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 6d894b2ace0282134c3ac72ff12e881c11490c59..7e59d85ba00baf9d160c9165037f2dcd2953f239 100644 (file)
@@ -693,7 +693,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 252f498ac2311b730c8bdc1b974298c3787f966d..ca516ee249720a11153661e6880325200f479cb3 100644 (file)
@@ -660,7 +660,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;
@@ -682,7 +682,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 },
@@ -765,7 +765,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;
@@ -821,7 +821,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 },
@@ -863,7 +863,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;
@@ -897,7 +897,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 },
@@ -905,7 +905,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 },
@@ -919,7 +919,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 },
@@ -935,7 +935,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 },
@@ -944,7 +944,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 },
@@ -953,7 +953,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},
@@ -976,7 +976,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},
@@ -984,7 +984,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},
@@ -1165,7 +1165,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 a2aa4fc6ce21f1123b5f7070f92b78c7020b86aa..9359f6c225f8e2f68da016b44c572180c87d3784 100644 (file)
@@ -534,7 +534,7 @@ linuxdvb_ddci_rd_thread_statistic_clr ( linuxdvb_ddci_rd_thread_t *ddci_rd_threa
   ddci_rd_thread->lddci_recv_pkgCntSL = 0;
 }
 
-static int inline
+static inline int
 ddci_ts_sync_count ( const uint8_t *tsb, int len )
 {
   const uint8_t *start = tsb;
index 51deeefcb58e8b7f0776763cfba392462e06c152..39ed536cea26e9944f284b957593f46f9722cd7a 100644 (file)
@@ -1111,7 +1111,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;
@@ -1133,7 +1133,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 4df45f279cc917fac58eb3f7d93e466d1c0a0960..6e9b92013ae70ef18f4ef16ae9070f3571a47814 100644 (file)
@@ -92,7 +92,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 48be9cf186ba27dd33784c621bb989c90191b542..beb20039ff32908962b86c5ca338b5d308d46711 100644 (file)
@@ -727,7 +727,7 @@ parse_aac(parser_t *t, parser_es_t *st, const uint8_t *data,
 /**
  * MPEG layer 1/2/3 parser
  */
-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},
@@ -740,8 +740,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)
@@ -851,9 +851,9 @@ static void parse_pes_mpa(parser_t *t, parser_es_t *st,
 /**
  * (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 53505c3f0548a568d1dd0cb3ba786a51a74c4c83..8a6a641c888471b84c5899f376318aa5216aa345 100644 (file)
@@ -1103,7 +1103,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 44e47ed937feb566a4e22b85fbdca67825e7b535..96e791349efb5a58aa33e80ac83d2f576d78d87d 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 },
index 9a8598b03a1a9ce6d8ed6cdeb4a4364e73eec263..93885d9a6558261198bfd19d59083508a11a19d0 100644 (file)
@@ -95,7 +95,7 @@ codec_get_type_string(AVCodec *self)
 const char *
 codec_get_title(AVCodec *self)
 {
-    static char __thread codec_title[TVH_TITLE_LEN];
+    static __thread char codec_title[TVH_TITLE_LEN];
 
     memset(codec_title, 0, sizeof(codec_title));
     if (
index 93fe8c8a99d2c355a23611048efb70e6f64a75b5..7138e1fc0196430bf84526081e772488f1ee08c1 100644 (file)
@@ -185,7 +185,7 @@ tvh_codec_profile_get_name(TVHCodecProfile *self)
 const char *
 tvh_codec_profile_get_title(TVHCodecProfile *self)
 {
-    static char __thread profile_title[TVH_TITLE_LEN];
+    static __thread char profile_title[TVH_TITLE_LEN];
 
     memset(profile_title, 0, sizeof(profile_title));
     if (str_snprintf(profile_title, sizeof(profile_title),