add comment + TODO regarding VSPP warning

This commit is contained in:
Peter Thorson
2013-06-09 09:25:30 -05:00
parent 21d79e28c6
commit e680ca1ef4

View File

@@ -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;