[prev in list] [next in list] [prev in thread] [next in thread]
List: openvswitch-discuss
Subject: [ovs-discuss] [PATCH 2/4] Cleanup incorrect unitialized variable warnings.
From: jpettit () nicira ! com (Justin Pettit)
Date: 2009-08-26 0:08:13
Message-ID: 1251245295-26905-2-git-send-email-jpettit () nicira ! com
[Download RAW message or body]
The NetBSD compiler warns that these variables may be used unitialized.
They are not, but this commit gets rid of the warnings.
---
lib/dpif.c | 2 +-
ofproto/ofproto.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/dpif.c b/lib/dpif.c
index e823fa3..649c246 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -397,7 +397,7 @@ dpif_port_list(const struct dpif *dpif,
struct odp_port **portsp, size_t *n_portsp)
{
struct odp_port *ports;
- size_t n_ports;
+ size_t n_ports = 0;
int error;
for (;;) {
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index c26cdc2..dbaa75b 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -3131,7 +3131,7 @@ send_flow_exp(struct ofproto *p, struct rule *rule,
{
struct ofconn *ofconn;
struct ofconn *prev;
- struct ofpbuf *buf;
+ struct ofpbuf *buf = NULL;
/* We limit the maximum number of queued flow expirations it by accounting
* them under the counter for replies. That works because preventing
--
1.6.0.6
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic