[ovs-dev] [PATCH] datapath-windows: WDK 10 IpHelper rename local variables

Alin Serdean aserdean at cloudbasesolutions.com
Thu Dec 29 00:25:51 UTC 2016


Compiling under WDK 10 triggers some warnings in IpHelper, which lead
to a failing build.

The root cause is that local variables `ipAddr` and `link` hide the previous
local declaration.

This patch just renames the variables.

Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
---
 datapath-windows/ovsext/IpHelper.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/datapath-windows/ovsext/IpHelper.c b/datapath-windows/ovsext/IpHelper.c
index 0220572..0043564 100644
--- a/datapath-windows/ovsext/IpHelper.c
+++ b/datapath-windows/ovsext/IpHelper.c
@@ -1608,17 +1608,17 @@ OvsHandleFwdRequest(POVS_IP_HELPER_REQUEST request)
 
     status = OvsGetRoute(&dst, &ipRoute, &src, &instance, &fwdInfo.vport, request->fwdReq.tunnelKey.src);
     if (request->fwdReq.tunnelKey.src && request->fwdReq.tunnelKey.src != src.Ipv4.sin_addr.s_addr) {
-        UINT32 ipAddr = dst.Ipv4.sin_addr.s_addr;
+        UINT32 tempAddr = dst.Ipv4.sin_addr.s_addr;
         OVS_LOG_INFO("Fail to get route to %d.%d.%d.%d, status: %x",
-            ipAddr & 0xff, (ipAddr >> 8) & 0xff,
-            (ipAddr >> 16) & 0xff, (ipAddr >> 24) & 0xff, status);
+                     tempAddr & 0xff, (tempAddr >> 8) & 0xff,
+                     (tempAddr >> 16) & 0xff, (tempAddr >> 24) & 0xff, status);
         goto fwd_handle_nbl;
     }
     if (status != STATUS_SUCCESS || instance == NULL) {
-        UINT32 ipAddr = dst.Ipv4.sin_addr.s_addr;
+        UINT32 tempAddr = dst.Ipv4.sin_addr.s_addr;
         OVS_LOG_INFO("Fail to get route to %d.%d.%d.%d, status: %x",
-                     ipAddr & 0xff, (ipAddr >> 8) & 0xff,
-                     (ipAddr >> 16) & 0xff, (ipAddr >> 24) & 0xff, status);
+                     tempAddr & 0xff, (tempAddr >> 8) & 0xff,
+                     (tempAddr >> 16) & 0xff, (tempAddr >> 24) & 0xff, status);
         goto fwd_handle_nbl;
     }
 
-- 
2.10.2.windows.1


More information about the dev mailing list