diff options
| author | Beniamino Galvani <bgalvani@redhat.com> | 2018-02-08 11:18:06 +0100 |
|---|---|---|
| committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-10-19 18:39:34 +0200 |
| commit | ad98a41399c02f1eefcaac6d2faf876227ad82bc (patch) | |
| tree | 05c68cd96cedd95af214232c1a7b35427d50240e | |
| parent | ad0400408ef797c75407e3bc016379ff0944aa16 (diff) | |
| download | NetworkManager-ad98a41399c02f1eefcaac6d2faf876227ad82bc.tar.gz | |
dns: fix compilation error
Fixes the following error when building with gcc 4.8.5 and address
sanitizer:
src/dns/nm-dns-dnsmasq.c: In function 'update':
src/dns/nm-dns-dnsmasq.c:506:44: error: 'first_prio' may be used uninitialized in this function [-Werror=maybe-uninitialized]
} else if (first_prio < 0 && first_prio != prio)
^
(cherry picked from commit 10ef61408e2a40f2b0cd6b5a801a2025cec1bdda)
| -rw-r--r-- | src/dns/nm-dns-dnsmasq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dns/nm-dns-dnsmasq.c b/src/dns/nm-dns-dnsmasq.c index c3065ea2db..3739a28eb2 100644 --- a/src/dns/nm-dns-dnsmasq.c +++ b/src/dns/nm-dns-dnsmasq.c @@ -490,7 +490,7 @@ update (NMDnsPlugin *plugin, NMDnsDnsmasq *self = NM_DNS_DNSMASQ (plugin); NMDnsDnsmasqPrivate *priv = NM_DNS_DNSMASQ_GET_PRIVATE (self); GVariantBuilder servers; - int prio, first_prio; + int prio, first_prio = 0; const NMDnsIPConfigData *ip_data; gboolean is_first = TRUE; |
