[ovs-dev] [PATCH 29/40] datapath-windows: Suppress warning in jhash

Alin Serdean aserdean at cloudbasesolutions.com
Fri Jul 14 04:40:56 UTC 2017


Suppress overflow warning to keep static code analysis happy.

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

diff --git a/datapath-windows/ovsext/Jhash.c b/datapath-windows/ovsext/Jhash.c
index db08d0b..f42104d 100644
--- a/datapath-windows/ovsext/Jhash.c
+++ b/datapath-windows/ovsext/Jhash.c
@@ -121,6 +121,8 @@ OvsJhashBytes(const VOID *p_, SIZE_T n, UINT32 basis)
         memcpy(tmp, p, n);
         a += tmp[0];
         b += tmp[1];
+#pragma warning(suppress: 6385)
+        /* Suppress buffer overflow, it is either zero or some random value */
         c += tmp[2];
         JhashFinal(&a, &b, &c);
     }
-- 
2.10.2.windows.1


More information about the dev mailing list