[Dnsmasq-discuss] Fwd: dnsmasq 2.92test2: Compiler warnings
Opty
opty77 at gmail.com
Wed Apr 9 11:50:40 UTC 2025
Damn, forgot to send it to the list as well.
---------- Forwarded message ---------
From: Opty <opty77 at gmail.com>
Date: Wed, Apr 9, 2025 at 1:35 PM
Subject: Re: [Dnsmasq-discuss] dnsmasq 2.92test2: Compiler warnings
To: P w <stappers at stappers.nl>
On Tue, Apr 8, 2025 at 10:24 PM P w <stappers at stappers.nl> wrote:
> Patches welcome
At least 'make COPTS="-DHAVE_DNSSEC"' needed, builds fine:
diff -Naur a/dnsmasq-2.92test2/src/cache.c b/dnsmasq-2.92test2/src/cache.c
--- a/dnsmasq-2.92test2/src/cache.c 2025-04-04 23:01:51.000000000 +0200
+++ b/dnsmasq-2.92test2/src/cache.c 2025-04-09 12:10:03.321927534 +0200
@@ -881,15 +881,15 @@
/* Sneak in possibly updated crypto HWM. */
if (!read_write(fd, (unsigned char *)&m, sizeof(m), RW_READ))
return 0;
- if (m > daemon->metrics[METRIC_CRYPTO_HWM])
+ if ((unsigned int)m > daemon->metrics[METRIC_CRYPTO_HWM])
daemon->metrics[METRIC_CRYPTO_HWM] = m;
if (!read_write(fd, (unsigned char *)&m, sizeof(m), RW_READ))
return 0;
- if (m > daemon->metrics[METRIC_SIG_FAIL_HWM])
+ if ((unsigned int)m > daemon->metrics[METRIC_SIG_FAIL_HWM])
daemon->metrics[METRIC_SIG_FAIL_HWM] = m;
if (!read_write(fd, (unsigned char *)&m, sizeof(m), RW_READ))
return 0;
- if (m > daemon->metrics[METRIC_WORK_HWM])
+ if ((unsigned int)m > daemon->metrics[METRIC_WORK_HWM])
daemon->metrics[METRIC_WORK_HWM] = m;
#endif
cache_end_insert();
diff -Naur a/dnsmasq-2.92test2/src/dnssec.c b/dnsmasq-2.92test2/src/dnssec.c
--- a/dnsmasq-2.92test2/src/dnssec.c 2025-04-04 23:01:51.000000000 +0200
+++ b/dnsmasq-2.92test2/src/dnssec.c 2025-04-09 12:27:30.586539103 +0200
@@ -992,7 +992,7 @@
char *keyname, int class, int *validate_counter)
{
unsigned char *p = (unsigned char *)(header+1);
- int qtype, qclass, rc, i, neganswer = 0, nons = 0, servfail = 0,
neg_ttl = 0, found_supported = 0;
+ int qtype, qclass, rc = STAT_NEED_DS, i, neganswer = 0, nons = 0,
servfail = 0, neg_ttl = 0, found_supported = 0;
int aclass, atype, rdlen, flags;
unsigned long ttl;
union all_addr a;
Unfortunately Gmail web UI converts tabs to spaces so beware or use
<https://termbin.com/ad1l>.
Regards,
Opty
More information about the Dnsmasq-discuss
mailing list