Previous commit 336a5584 has a variable declared inline, while
-Wdeclaration-after-statement flag is enabled on this branch. This
causes build failure:

   lib/lacp.c:620:9: error: mixing declarations and code

The declaration of the variable "enable" has been moved in this change
to comply with the expected behavior.

Signed-off-by: Shu Shen <shu.s...@gmail.com>
---

v1->v2: Subject line updated to indicate branch 2.3

 lib/lacp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/lacp.c b/lib/lacp.c
index d006d7b56..e37177813 100644
--- a/lib/lacp.c
+++ b/lib/lacp.c
@@ -597,6 +597,7 @@ lacp_update_attached(struct lacp *lacp) OVS_REQUIRES(mutex)
     lead_enable = false;
     HMAP_FOR_EACH (slave, node, &lacp->slaves) {
         struct lacp_info pri;
+        bool enable;
 
         slave->attached = false;
 
@@ -617,7 +618,7 @@ lacp_update_attached(struct lacp *lacp) OVS_REQUIRES(mutex)
 
         slave->attached = true;
         slave_get_priority(slave, &pri);
-        bool enable = slave_may_enable__(slave);
+        enable = slave_may_enable__(slave);
 
         if (!lead
             || enable > lead_enable
-- 
2.11.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to