Changes in one function effect another non-modified one



I changed one function in my source code, and TrueCoverage also identifies another function in the file that I did not change as changed. Why?


When you add and/or remove lines from a source file,  there is a situation where TrueCoverage identifies functions that were not actually modified as modified during a merge operation.  This occurs when a function directly or indirectly uses the __LINE__ macro.  MFC's ASSERT macro and various C runtime debug routines (including the new operator, malloc, calloc, realloc, and expand) use this macro.  Adding and/or removing lines of text in a source file before the use of __LINE__ changes its value when the image is instrumented after the change. Since it's value changes,  TrueCoverage views this as a source code modification for the function and marks the function as changed.

Old KB# 11482
Comment List
Related Discussions