[Dnsmasq-discuss] Three v2.92test8 findings (one regression from d1008215 made 2025 May 14)
Patch Collector
stappers at stappers.nl
Sat May 17 05:32:03 UTC 2025
On Fri, May 16, 2025 at 06:46:07PM +0200, Matthias Andree via Dnsmasq-discuss wrote:
> Hi Simon,
Hello Mailinglist,
> ....
> Also, lower priority,
>
> finding #2, the attached patch fixes a warning about an unused static
> function:
>
> forward.c:673:23:warning: 'domain_find_sets' defined but not used
> [-Wunused-function]
> 673 | static struct ipsets *domain_find_sets(struct ipsets *setlist, const
> char *domain) {
> | ^~~~~~~~~~~~~~~~
>
> From 74872d27f41b92227f9350b1775a5fdd8f8576c2 Mon Sep 17 00:00:00 2001
> From: Matthias Andree <matthias.andree at gmx.de>
> Date: Fri, 16 May 2025 18:40:55 +0200
> Subject: [PATCH] Avoid compiling domain_find_sets unless it's used later.
>
> ---
> src/forward.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/forward.c b/src/forward.c
> index 9bdb38a..37d2497 100644
> --- a/src/forward.c
> +++ b/src/forward.c
> @@ -670,6 +670,7 @@ int fast_retry(time_t now)
> return ret;
> }
>
> +#if defined(HAVE_IPSET) || defined(HAVE_NFTSET)
> static struct ipsets *domain_find_sets(struct ipsets *setlist, const char *domain) {
> /* Similar algorithm to search_servers. */
> struct ipsets *ipset_pos, *ret = NULL;
> @@ -690,6 +691,7 @@ static struct ipsets *domain_find_sets(struct ipsets *setlist, const char *domai
>
> return ret;
> }
> +#endif
>
> static size_t process_reply(struct dns_header *header, time_t now, struct server *server, size_t n, int check_rebind,
> int no_cache, int cache_secure, int bogusanswer, int ad_reqd, int do_bit, int added_pheader,
> --
> 2.49.0
>
The (poorly presented) patch has been seen. And this (poor) email should
be recieved as an invite for a next attempt.
More information about the Dnsmasq-discuss
mailing list