diff --git a/src/OSD/OSD_MAllocHook.cxx b/src/OSD/OSD_MAllocHook.cxx index ef54a3824d..be8f28e1d6 100644 --- a/src/OSD/OSD_MAllocHook.cxx +++ b/src/OSD/OSD_MAllocHook.cxx @@ -38,8 +38,13 @@ static OSD_MAllocHook::Callback* MypCurrentCallback = NULL; namespace { // dummy function to call at place where break point might be needed - inline void place_for_breakpoint () {} -} + static unsigned debug_counter = 0; + inline void place_for_breakpoint () { + // this statement is just to have any instruction in object code, + // otherwise compiler does not leave a place for break point + debug_counter++; + } +}; //======================================================================= //function : GetCallback @@ -80,7 +85,7 @@ OSD_MAllocHook::CollectBySize* OSD_MAllocHook::GetCollectBySize() #ifdef WNT #include -#if _MSC_VER == 1500 /* VS 2008 */ +#if _MSC_VER >= 1500 /* VS 2008 */ static long getRequestNum(void* pvData, long lRequest, size_t& theSize) { @@ -111,7 +116,7 @@ static long getRequestNum(void* pvData, long lRequest, size_t& theSize) return aHeader->lRequest; } -#else /* _MSC_VER == 1500 */ +#else /* _MSC_VER < 1500 */ static long getRequestNum(void* /*pvData*/, long lRequest, size_t& /*theSize*/) {