How to handle identified Coverity issues within Microsoft MFC libraries

Daratha, Paul 0 Reputation points
2024-08-15T17:09:56.81+00:00

Hello

Our Coverity 2023.6.0 scan identify Uninitialized scalar field and Uninitialized pointer field issues using a CMap MFC class which is defined in /%ProgramFiles(x86)%/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.37.32822/atlmfc/include/afxtempl.h.

Image

and

Image

Do we use CMap in a wrong way?

There is no special construct available which would initialize those inner fields.

Can you give us an advise how shall we treat the Coverity finding or if this is a false positive finding?

Best Regards

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,760 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.