From e680ca1ef4886cf849887e0836e2cc4fd16afef5 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Sun, 9 Jun 2013 09:25:30 -0500 Subject: [PATCH] add comment + TODO regarding VSPP warning --- websocketpp/sha1/sha1.hpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/websocketpp/sha1/sha1.hpp b/websocketpp/sha1/sha1.hpp index b5db4ac09a..970dd6e40d 100755 --- a/websocketpp/sha1/sha1.hpp +++ b/websocketpp/sha1/sha1.hpp @@ -102,13 +102,18 @@ class SHA1 while(length-- && !Corrupted) { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(suppress: 6386) // Suppresses Visual Studio code analysis for write overrun. It doesn't know the index into Message_Block is protected by checking length. +// Suppresses Visual Studio code analysis for write overrun. It doesn't know the +// index into Message_Block is protected by checking length. +// +// TODO: is there a more compatible way to write the original code to avoid +// this sort of warning? +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(suppress: 6386) #endif Message_Block[Message_Block_Index++] = (*message_array & 0xFF); -#ifdef _MSC_VER -#pragma warning(pop) +#ifdef _MSC_VER +#pragma warning(pop) #endif Length_Low += 8;