From a7f7d1bde43fc825c49afea3f946f5b4b3d563e0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 27 Mar 2015 12:02:49 +0100 Subject: fix gcc warnings about uninitialized variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit like: src/shared/install.c: In function ‘unit_file_lookup_state’: src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] return r < 0 ? r : state; ^ src/shared/install.c:1796:13: note: ‘r’ was declared here int r; ^ --- src/resolve/resolved-dns-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resolve/resolved-dns-transaction.c') diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index 74b0634142..bc1a90db1b 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -252,7 +252,7 @@ static int dns_transaction_open_tcp(DnsTransaction *t) { fd = dns_scope_tcp_socket(t->scope, t->received->family, &t->received->sender, t->received->sender_port); else { union in_addr_union address; - int family; + int family = AF_UNSPEC; /* Otherwise, try to talk to the owner of a * the IP address, in case this is a reverse -- cgit v1.2.3-54-g00ecf