[Dnsmasq-discuss] dnsmasq 2.92test2: Compiler warnings
Geert Stappers
stappers at stappers.nl
Thu Apr 17 05:21:35 UTC 2025
On Wed, Apr 16, 2025 at 03:48:37PM +0100, Simon Kelley wrote:
> On 4/8/25 11:49, pedro wrote:
> > dnssec.c: In function ‘dnssec_validate_ds’:
> > dnssec.c:995:22: warning: ‘rc’ may be used uninitialized in this
> > function [-Wmaybe-uninitialized]
> > int qtype, qclass, rc, i, neganswer = 0, nons = 0, servfail = 0, neg_ttl = 0, found_supported = 0;
> >
>
> What compiler version are you using? It's not too difficult to convince
> yourself that both of these are false warnings, but that may be too subtle
> for older, simpler, dataflow analysis.
>
> Either that or both me and gcc 13.3.0 (which doesn't warn on this) have
> missed something, and you have a cleverer compiler.
Opty, the one with poor email access, shared with us:
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;
IMNSHO we, the dnsmasq project, should improve on patch handling.
Regards
Geert Stappers
On another it is the 17th, Pick up the patches.
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list