diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 8e890f81db2..616d4a1e31a 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 a034ec9a950..de48853c731 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;