diff mbox

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

Message ID 20170714044033.15196-30-aserdean@cloudbasesolutions.com
State Accepted
Headers show

Commit Message

Alin Serdean July 14, 2017, 4:40 a.m. UTC
Suppress overflow warning to keep static code analysis happy.

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

Patch

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);
     }