summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurucharan Shetty <gshetty@nicira.com>2014-09-15 10:10:34 -0700
committerGurucharan Shetty <gshetty@nicira.com>2014-09-15 14:55:56 -0700
commitd72eff6cec01187d9b6b0f8befdbdec0943e6012 (patch)
tree039a9028bb75c237c863a67f46b9e169087a26c5
parent355ead69010c123475a9d2ade23b1cc667d868cb (diff)
downloadopenvswitch-d72eff6cec01187d9b6b0f8befdbdec0943e6012.tar.gz
Fix remaining "uninitialized local variable" used warning by MSVC.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
-rw-r--r--ofproto/ofproto-dpif-upcall.c2
-rw-r--r--tests/test-cmap.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 8e890f81d..616d4a1e3 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1750,7 +1750,7 @@ upcall_unixctl_dump_wait(struct unixctl_conn *conn,
void *aux OVS_UNUSED)
{
if (list_is_singleton(&all_udpifs)) {
- struct udpif *udpif;
+ struct udpif *udpif = NULL;
size_t len;
udpif = OBJECT_CONTAINING(list_front(&all_udpifs), udpif, list_node);
diff --git a/tests/test-cmap.c b/tests/test-cmap.c
index a034ec9a9..de48853c7 100644
--- a/tests/test-cmap.c
+++ b/tests/test-cmap.c
@@ -78,7 +78,8 @@ check_cmap(struct cmap *cmap, const int values[], size_t n,
/* Here we test iteration with cmap_next_position() */
i = 0;
while ((node = cmap_next_position(cmap, &pos))) {
- struct element *e = OBJECT_CONTAINING(node, e, node);
+ struct element *e = NULL;
+ e = OBJECT_CONTAINING(node, e, node);
assert(i < n);
cmap_values2[i++] = e->value;