From: Ed Maste Date: Wed, 8 Aug 2012 18:48:01 +0000 (+0000) Subject: netdev-bsd: Initialize variable to silence a compiler warning. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a78b6a9e194937ba9fe1d59bccdde831b94b1734;p=openvswitch netdev-bsd: Initialize variable to silence a compiler warning. FreeBSD's system compiler is a somewhat old version of GCC that produced a spurious warning about a potential unitialized variable use. Signed-off-by: Ed Maste Signed-off-by: Ben Pfaff --- diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c index 0b1a37c3..f8b11880 100644 --- a/lib/netdev-bsd.c +++ b/lib/netdev-bsd.c @@ -453,7 +453,7 @@ netdev_bsd_listen(struct netdev *netdev_) struct netdev_bsd *netdev = netdev_bsd_cast(netdev_); char errbuf[PCAP_ERRBUF_SIZE]; int error; - int fd; + int fd = -1; int one = 1; if (netdev->netdev_fd >= 0) {