Fix remaining "uninitialized local variable" used warning by MSVC.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 15 Sep 2014 17:10:34 +0000 (10:10 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Mon, 15 Sep 2014 21:55:56 +0000 (14:55 -0700)
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-upcall.c
tests/test-cmap.c

index 8e890f8..616d4a1 100644 (file)
@@ -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);
index a034ec9..de48853 100644 (file)
@@ -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;