diff --git a/daemon/dtmf.c b/daemon/dtmf.c index 49e271d64..a2bf78380 100644 --- a/daemon/dtmf.c +++ b/daemon/dtmf.c @@ -758,8 +758,8 @@ static const char *dtmf_inject_pcm(struct call_media *media, struct call_media * .rtp = &rtp, .ssrc_in = ssrc_in, .ssrc_out = ssrc_out, - .raw = { (void *) &tep, sizeof(tep) }, - .payload = { (void *) &tep, sizeof(tep) }, + .raw = { (void *) &tep, sizeof(tep), 0 }, + .payload = { (void *) &tep, sizeof(tep), 0 }, .sink = { .sink = sink_ps }, }; diff --git a/daemon/main.c b/daemon/main.c index a2b3b02ed..0ff1aab13 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -892,7 +892,7 @@ static void options(int *argc, char ***argv, charp_ht templates) { { "ng-client-timeout",0,0,G_OPTION_ARG_INT, &rtpe_config.ng_client_timeout,"Timeout in milliseconds for outgoing NG requests","INT"}, { "ng-client-retries",0,0,G_OPTION_ARG_INT, &rtpe_config.ng_client_retries,"How often to retry a timed-out NG request","INT"}, - { NULL, } + { 0 } }; struct ifaddrs *ifas; diff --git a/lib/auxlib.c b/lib/auxlib.c index 9e092f414..2419af81d 100644 --- a/lib/auxlib.c +++ b/lib/auxlib.c @@ -274,7 +274,7 @@ void config_load_ext(int *argc, char ***argv, GOptionEntry *app_entries, const c { "codec-chain-opus-application",0,0,G_OPTION_ARG_STRING,&opus_application, "Opus application", "default|VoIP|audio|low-delay" }, { "codec-chain-opus-complexity",0,0,G_OPTION_ARG_INT, &rtpe_common_config_ptr->codec_chain_opus_complexity,"Opus encoding complexity (0..10)","INT" }, #endif - { NULL, } + { 0 } }; #undef ll diff --git a/lib/auxlib.h b/lib/auxlib.h index b98ee4b78..f844ccad3 100644 --- a/lib/auxlib.h +++ b/lib/auxlib.h @@ -513,7 +513,7 @@ INLINE gboolean int64_eq(const uint64_t *a, const uint64_t *b) { /*** TAINT FUNCTIONS ***/ -#if HAS_ATTR(__error__) +#if HAS_ATTR(__error__) && !defined(__clang__) /* This is not supported in clang, and on gcc it might become inert if the * symbol gets remapped to a builtin or stack protected function, but it * otherwise gives better diagnostics. */ diff --git a/lib/containers.h b/lib/containers.h index 2cd6e96ca..c9d21e684 100644 --- a/lib/containers.h +++ b/lib/containers.h @@ -28,10 +28,10 @@ static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) { /* unused members to store the contained types */ \ type_name __ht; \ }; \ - static inline type_name type_name##_null(void) { \ + __attribute__((unused)) static inline type_name type_name##_null(void) { \ return (type_name) { NULL }; \ } \ - static inline void type_name##_destroy_ptr(type_name *h) { \ + __attribute__((unused)) static inline void type_name##_destroy_ptr(type_name *h) { \ if (h->ht) \ g_hash_table_destroy(h->ht); \ h->ht = NULL; \ @@ -225,14 +225,14 @@ static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) { "tail offset mismatch"); \ static_assert(G_STRUCT_OFFSET(GQueue, length) == G_STRUCT_OFFSET(type_name##_q, length), \ "length offset mismatch"); \ - static inline type_name##_q *type_name##_q_new(void) { \ + __attribute__((unused)) static inline type_name##_q *type_name##_q_new(void) { \ GQueue *q = g_queue_new(); \ return (type_name##_q *) q; \ } \ - static inline void type_name##_q_clear(type_name##_q *q) { \ + __attribute__((unused)) static inline void type_name##_q_clear(type_name##_q *q) { \ g_queue_clear(&q->q); \ } \ - static inline void type_name##_q_free(type_name##_q *q) { \ + __attribute__((unused)) static inline void type_name##_q_free(type_name##_q *q) { \ g_queue_free(&q->q); \ } @@ -461,18 +461,18 @@ static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) { "pdata offset mismatch"); \ static_assert(G_STRUCT_OFFSET(GPtrArray, len) == G_STRUCT_OFFSET(type_name, len), \ "len offset mismatch"); \ - static inline type_name *type_name##_new_sized(unsigned int len) { \ + __attribute__((unused)) static inline type_name *type_name##_new_sized(unsigned int len) { \ void (*func)(contained_type *) = free_func; \ return (type_name *) g_ptr_array_new_full(len, (GDestroyNotify) func); \ } \ - static inline type_name *type_name##_new(void) { \ + __attribute__((unused)) static inline type_name *type_name##_new(void) { \ return type_name##_new_sized(0); \ } \ - static inline void type_name##_destroy(type_name *A) { \ + __attribute__((unused)) static inline void type_name##_destroy(type_name *A) { \ if (A) \ g_ptr_array_free(&(A)->a, TRUE); \ } \ - static inline void type_name##_destroy_ptr(type_name **A) { \ + __attribute__((unused)) static inline void type_name##_destroy_ptr(type_name **A) { \ if (*A) \ g_ptr_array_free(&(*A)->a, TRUE); \ *A = NULL; \ diff --git a/utils/const_str_hash b/utils/const_str_hash index 59b30f34a..1bcf185ed 100755 --- a/utils/const_str_hash +++ b/utils/const_str_hash @@ -196,12 +196,13 @@ for my $section (@sections) { print "#pragma GCC diagnostic push\n"; print "#pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"\n"; - print "#pragma GCC diagnostic ignored \"-Wshadow=global\"\n"; + print "#pragma GCC diagnostic ignored \"-Wshadow\"\n"; print $hash_func_code; print "#pragma GCC diagnostic pop\n"; # add convenience function print <s) @@ -221,6 +222,7 @@ for my $section (@sections) { } print <= G_N_ELEMENTS(__csh_lookup_funcs))