[ovs-dev] [PATCH] datapath-windows: Add paranthesis to fix error C2275

Nithin Raju nithin at vmware.com
Fri Apr 22 06:38:00 UTC 2016


Acked-by: Nithin Raju <nithin at vmware.com>

-----Original Message-----
From: dev <dev-bounces at openvswitch.org> on behalf of Sairam Venugopal
<vsairam at vmware.com>
Date: Thursday, April 21, 2016 at 10:44 PM
To: "dev at openvswitch.org" <dev at openvswitch.org>
Subject: [ovs-dev] [PATCH] datapath-windows: Add paranthesis to fix
error	C2275

>Add braces around the if condition to prevent Visual Studio from giving
>the "error C2275: illegal use of this type as an expresion". This happens
>when a variable is declared after a block. This error occurs on certain
>versions of compilers.
>
>Signed-off-by: Sairam Venugopal <vsairam at vmware.com>
>---
> datapath-windows/ovsext/Conntrack.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/datapath-windows/ovsext/Conntrack.c
>b/datapath-windows/ovsext/Conntrack.c
>index fbeb70c..158d9d8 100644
>--- a/datapath-windows/ovsext/Conntrack.c
>+++ b/datapath-windows/ovsext/Conntrack.c
>@@ -186,8 +186,9 @@ OvsCtEntryDelete(POVS_CT_ENTRY entry)
> static __inline BOOLEAN
> OvsCtEntryExpired(POVS_CT_ENTRY entry)
> {
>-    if (entry == NULL)
>+    if (entry == NULL) {
>         return TRUE;
>+    }
> 
>     UINT64 currentTime;
>     NdisGetCurrentSystemTime((LARGE_INTEGER *)&currentTime);
>-- 
>1.9.5.msysgit.0
>
>_______________________________________________
>dev mailing list
>dev at openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailma
>n_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=pN
>HQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=h6_yNGHlxMhykXThUtzSUSf02QSeP7
>bpFnPWt5XezxY&s=p0gQZkr6mrjU7SREWFPd4B6MXsqWyRJDwVHhGMQquQM&e= 




More information about the dev mailing list