Compiler quietening
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 14 Sep 2024 09:14:42 +0000 (10:14 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 14 Sep 2024 09:14:42 +0000 (10:14 +0100)
src/src/miscmods/arc.c
src/src/miscmods/dkim.c
src/src/miscmods/dkim_transport.c
src/src/miscmods/dmarc.c
src/src/miscmods/exim_filter.c
src/src/miscmods/pam.c
src/src/miscmods/pdkim/pdkim.c
src/src/miscmods/perl.c
src/src/miscmods/radius.c
src/src/miscmods/sieve_filter.c
src/src/miscmods/spf.c

index b35c17277e7c9328a7fd6cf032d5fabe0dfaa310..dbf7f58f4d5fb6fd122f344cc16bbcaac7b4ea03 100644 (file)
@@ -2132,13 +2132,13 @@ return arc_state;
 /* Module API */
 
 static void * arc_functions[] = {
-  [ARC_VERIFY] =       acl_verify_arc,
-  [ARC_HEADER_FEED] =  arc_header_feed,
-  [ARC_STATE_IS_PASS] =        arc_is_pass,
-  [ARC_SIGN_INIT] =    arc_sign_init,
-  [ARC_SIGN] =         arc_sign,
+  [ARC_VERIFY] =       (void *) acl_verify_arc,
+  [ARC_HEADER_FEED] =  (void *) arc_header_feed,
+  [ARC_STATE_IS_PASS] =        (void *) arc_is_pass,
+  [ARC_SIGN_INIT] =    (void *) arc_sign_init,
+  [ARC_SIGN] =         (void *) arc_sign,
 # ifdef SUPPORT_DMARC
-  [ARC_ARCSET_INFO] =  arc_arcset_string,
+  [ARC_ARCSET_INFO] =  (void *) arc_arcset_string,
 # endif
 };
 
index 40339d100af146d329653686e2b803ad204aa82f..a2a8faba8360aefae3ed1aeb9057e9308f938fc8 100644 (file)
@@ -126,6 +126,7 @@ return NULL;        /*XXX better error detail?  logging? */
 
 
 
+#ifdef EXPERIMENTAL_ARC
 /* Module API:  Lookup a DNS DKIM record and parse the pubkey.
 
 Arguments:
@@ -161,7 +162,6 @@ return p->srvtype;
 
 
 
-#ifdef EXPERIMENTAL_ARC
 /* Return:
        OK      verify succesful
        FAIL    verify did not pass
@@ -1302,34 +1302,34 @@ static optionlist dkim_options[] = {
 };
 
 static void * dkim_functions[] = {
-  [DKIM_VERIFY_FEED] =         dkim_exim_verify_feed,
-  [DKIM_VERIFY_PAUSE] =                dkim_exim_verify_pause,
-  [DKIM_VERIFY_FINISH] =       dkim_exim_verify_finish,
-  [DKIM_ACL_ENTRY] =           dkim_exim_acl_entry,
-  [DKIM_VERIFY_LOG_ALL] =      dkim_exim_verify_log_all,
-  [DKIM_VDOM_FIRSTPASS] =      dkim_exim_vdom_firstpass,
+  [DKIM_VERIFY_FEED] =         (void *) dkim_exim_verify_feed,
+  [DKIM_VERIFY_PAUSE] =                (void *) dkim_exim_verify_pause,
+  [DKIM_VERIFY_FINISH] =       (void *) dkim_exim_verify_finish,
+  [DKIM_ACL_ENTRY] =           (void *) dkim_exim_acl_entry,
+  [DKIM_VERIFY_LOG_ALL] =      (void *) dkim_exim_verify_log_all,
+  [DKIM_VDOM_FIRSTPASS] =      (void *) dkim_exim_vdom_firstpass,
 
-  [DKIM_SIGNER_ISINLIST] =     dkim_exim_signer_isinlist,
-  [DKIM_STATUS_LISTMATCH] =    dkim_exim_status_listmatch,
+  [DKIM_SIGNER_ISINLIST] =     (void *) dkim_exim_signer_isinlist,
+  [DKIM_STATUS_LISTMATCH] =    (void *) dkim_exim_status_listmatch,
 
-  [DKIM_SETVAR] =              dkim_exim_setvar,
-  [DKIM_EXPAND_QUERY] =                dkim_exim_expand_query,
+  [DKIM_SETVAR] =              (void *) dkim_exim_setvar,
+  [DKIM_EXPAND_QUERY] =                (void *) dkim_exim_expand_query,
 
-  [DKIM_TRANSPORT_INIT] =      dkim_exim_sign_init,
-  [DKIM_TRANSPORT_WRITE] =     dkim_transport_write_message,
+  [DKIM_TRANSPORT_INIT] =      (void *) dkim_exim_sign_init,
+  [DKIM_TRANSPORT_WRITE] =     (void *) dkim_transport_write_message,
 
 #ifdef SUPPORT_DMARC
-  [DKIM_SIGS_LIST] =           dkim_sigs_list,
+  [DKIM_SIGS_LIST] =           (void *) dkim_sigs_list,
 #endif
 #ifdef EXPERIMENTAL_ARC
-  [DKIM_HASHNAME_TO_TYPE] =    dkim_hashname_to_type,
-  [DKIM_HASHTYPE_TO_METHOD] =  dkim_hashtype_to_method,
-  [DKIM_HASHNAME_TO_METHOD] =  dkim_hashname_to_method,
-  [DKIM_SET_BODYHASH] =                dkim_set_bodyhash,
-  [DKIM_DNS_PUBKEY] =          dkim_exim_parse_dns_pubkey,
-  [DKIM_SIG_VERIFY] =          dkim_exim_sig_verify,
-  [DKIM_HEADER_RELAX] =                pdkim_relax_header_n,
-  [DKIM_SIGN_DATA] =           dkim_sign_blob,
+  [DKIM_HASHNAME_TO_TYPE] =    (void *) dkim_hashname_to_type,
+  [DKIM_HASHTYPE_TO_METHOD] =  (void *) dkim_hashtype_to_method,
+  [DKIM_HASHNAME_TO_METHOD] =  (void *) dkim_hashname_to_method,
+  [DKIM_SET_BODYHASH] =                (void *) dkim_set_bodyhash,
+  [DKIM_DNS_PUBKEY] =          (void *) dkim_exim_parse_dns_pubkey,
+  [DKIM_SIG_VERIFY] =          (void *) dkim_exim_sig_verify,
+  [DKIM_HEADER_RELAX] =                (void *) pdkim_relax_header_n,
+  [DKIM_SIGN_DATA] =           (void *) dkim_sign_blob,
 #endif
 };
 
index f367df1ad400679855689fe6a2db77c5a35f5314..de14d0466655d42b83ff9d7b76603f4217137d77 100644 (file)
@@ -110,6 +110,7 @@ return TRUE;
 
 
 
+#ifdef EXPERIMENTAL_ARC
 /* Prepend ARC-signing headers to given set of headers
 
 Arguments:
@@ -134,6 +135,7 @@ if (mi)
 *errstr_p = US"failed to find arc module";
 return NULL;
 }
+#endif
 
 
 
index 161bfeececb97a95df7e01993fc074220988a4db..9741a3a45f0956d743ae18f9ee6f42486bd39717 100644 (file)
@@ -786,9 +786,9 @@ static optionlist dmarc_options[] = {
 };
 
 static void * dmarc_functions[] = {
-  [DMARC_PROCESS] =    dmarc_process,
-  [DMARC_EXPAND_QUERY] = dmarc_exim_expand_query,
-  [DMARC_STORE_DATA] = dmarc_store_data,
+  [DMARC_PROCESS] =    (void *) dmarc_process,
+  [DMARC_EXPAND_QUERY] = (void *) dmarc_exim_expand_query,
+  [DMARC_STORE_DATA] = (void *) dmarc_store_data,
 };
 
 /* dmarc_forensic_sender is provided for visibility of the the option setting
index a4c2f0898ad06ec307766a1c6186af2d98680f7b..77ea214dde74cbce63e9ca89747d79b69c4b311a 100644 (file)
@@ -2644,8 +2644,8 @@ return yield;
 /* Module API */
 
 static void * exim_functions[] = {
-  [EXIM_INTERPRET] =           filter_interpret,
-  [EXIM_FILTER_PERSONAL] =     filter_personal,
+  [EXIM_INTERPRET] =           (void *) filter_interpret,
+  [EXIM_FILTER_PERSONAL] =     (void *) filter_personal,
 };
 
 misc_module_info exim_filter_module_info =
index 5fb811a34139f5589c402b42cfb1c4c14d6d335c..1c94cc29f7842c48e0e01a1adb2a08f8b0aad16a 100644 (file)
@@ -206,7 +206,7 @@ return ERROR;
 /* Module API */
 
 static void * pam_functions[] = {
-  [RADIUS_AUTH_CALL] = auth_call_pam,
+  [PAM_AUTH_CALL] =    (void *) auth_call_pam,
 };
 
 misc_module_info pam_module_info =
index 7c2f3421793e62270862b0579da8c262aff43f05..c60e0686b0b384d877460af48d042e0a40698602 100644 (file)
@@ -936,18 +936,20 @@ static int
 pdkim_header_complete(pdkim_ctx * ctx)
 {
 gstring * g = ctx->cur_header;
-const misc_module_info * mi;
-typedef const uschar * (*fn_t)(gstring *, BOOL);
 
 if (gstring_length(g) > 1)
   gstring_trim_trailing(g, '\r');
 (void) string_from_gstring(g);
 
 #ifdef EXPERIMENTAL_ARC
-/* Feed the header line also to ARC processing */
-if ((mi = misc_mod_findonly(US"arc")))
-  (((fn_t *) mi->functions)[ARC_HEADER_FEED])
+  /* Feed the header line also to ARC processing */
+  {
+  const misc_module_info * mi;
+  typedef const uschar * (*fn_t)(gstring *, BOOL);
+  if ((mi = misc_mod_findonly(US"arc")))
+    (((fn_t *) mi->functions)[ARC_HEADER_FEED])
                                          (g, !(ctx->flags & PDKIM_MODE_SIGN));
+  }
 #endif
 
 if (++ctx->num_headers > PDKIM_MAX_HEADERS) goto BAIL;
index 90149474349ab74a45ec856053ccddc103b132f5..aef634967f6235f75edec14cf1d78e0414a1e62e 100644 (file)
@@ -208,8 +208,8 @@ call_perl_cat(gstring * yield, uschar **errstrp, uschar *name, uschar **arg)
 /* Module API */
 
 static void * perl_functions[] = {
-  [PERL_STARTUP] =     init_perl,
-  [PERL_CAT] =         call_perl_cat,
+  [PERL_STARTUP] =     (void *) init_perl,
+  [PERL_CAT] =         (void *) call_perl_cat,
 };
 
 misc_module_info perl_module_info =
index 6a8d41cac8e2b928e73fdf32b62b5dabeafeb9d1..b52c06ec135ef8077f3b0b8935eef96f48a3d95e 100644 (file)
@@ -225,7 +225,7 @@ return result;
 /* Module API */
 
 static void * rad_functions[] = {
-  [RADIUS_AUTH_CALL] = auth_call_radius,
+  [RADIUS_AUTH_CALL] = (void *) auth_call_radius,
 };
 
 misc_module_info radius_module_info =
index f3935caf3ca68eb296cd077bbadd26a0c728a398..70563db8c62888bb005a8ad15e47583e6b44b42f 100644 (file)
@@ -3627,8 +3627,8 @@ for (const uschar ** pp = exim_sieve_extension_list; *pp; ++pp)
 /* Module API */
 
 static void * sieve_functions[] = {
-  [SIEVE_INTERPRET] =  sieve_interpret,
-  [SIEVE_EXTENSIONS] = sieve_extensions,
+  [SIEVE_INTERPRET] =  (void *) sieve_interpret,
+  [SIEVE_EXTENSIONS] = (void *) sieve_extensions,
 };
 
 misc_module_info sieve_filter_module_info =
index 17c1a3602e5af5ade22fec853204078182c2a477..b27e8735398c7e681c2f26fa1e2f41b2dbbbf496 100644 (file)
@@ -565,12 +565,12 @@ static optionlist spf_options[] = {
 };
 
 static void * spf_functions[] = {
-  [SPF_PROCESS] =      spf_process,
-  [SPF_GET_RESPONSE] = spf_get_response,               /* ugly; for dmarc */
+  [SPF_PROCESS] =      (void *) spf_process,
+  [SPF_GET_RESPONSE] = (void *) spf_get_response,      /* ugly; for dmarc */
   
-  [SPF_OPEN] =         spf_lookup_open,
-  [SPF_CLOSE] =                spf_lookup_close,
-  [SPF_FIND] =         spf_lookup_find,
+  [SPF_OPEN] =         (void *) spf_lookup_open,
+  [SPF_CLOSE] =                (void *) spf_lookup_close,
+  [SPF_FIND] =         (void *) spf_lookup_find,
 };
 
 static var_entry spf_variables[] = {