This patch eliminates the following warning. > ofproto/ofproto-dpif.c: In function 'do_xlate_actions': > ofproto/ofproto-dpif.c:5282:17: warning: 'ofp_port' may be used uninitialized > in this function [-Wuninitialized] > ofproto/ofproto-dpif.c:5269:14: note: 'ofp_port' was declared here > $ gcc --version > gcc (Debian 4.7.0-8) 4.7.0 > Copyright (C) 2012 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp> --- ofproto/ofproto-dpif.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index a327951..f826c2e 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -5232,10 +5232,9 @@ static void xlate_autopath(struct action_xlate_ctx *ctx, const struct ofpact_autopath *ap) { - struct ofport_dpif *port; - uint32_t ofp_port; + uint32_t ofp_port = ap->port; + struct ofport_dpif *port = get_ofp_port(ctx->ofproto, ap->port); - port = get_ofp_port(ctx->ofproto, ap->port); if (!port || !port->bundle) { ofp_port = OFPP_NONE; } else if (port->bundle->bond) { -- 1.7.1.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev