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;