From 75689b3b41755e477db754e9591b845a6f2a3e80 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Tue, 16 Jul 2024 18:28:46 +0300 Subject: [PATCH] Fix alpine-riscv64 build (#104920) --- src/coreclr/vm/riscv64/cgencpu.h | 2 +- src/coreclr/vm/riscv64/stubs.cpp | 10 +++--- src/coreclr/vm/riscv64/virtualcallstubcpu.hpp | 2 +- src/coreclr/vm/stubmgr.cpp | 2 +- src/coreclr/vm/stubmgr.h | 10 +++--- .../eltprofiler/slowpatheltprofiler.cpp | 36 +++++++++---------- .../profiler/native/gcprofiler/gcprofiler.cpp | 4 +-- .../getappdomainstaticaddress.cpp | 28 +++++++-------- .../handlesprofiler/handlesprofiler.cpp | 10 +++--- .../native/handlesprofiler/handlesprofiler.h | 2 +- src/tests/profiler/native/profiler.cpp | 14 ++++---- .../native/rejitprofiler/rejitprofiler.cpp | 22 ++++++------ 12 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/coreclr/vm/riscv64/cgencpu.h b/src/coreclr/vm/riscv64/cgencpu.h index 6ce6e5fa90f84..8d0453254e8c0 100644 --- a/src/coreclr/vm/riscv64/cgencpu.h +++ b/src/coreclr/vm/riscv64/cgencpu.h @@ -259,7 +259,7 @@ inline TADDR GetMem(PCODE address, SIZE_T size, bool signExtend) } EX_CATCH { - mem = NULL; + mem = (TADDR)NULL; _ASSERTE(!"Memory read within jitted Code Failed, this should not happen!!!!"); } EX_END_CATCH(SwallowAllExceptions); diff --git a/src/coreclr/vm/riscv64/stubs.cpp b/src/coreclr/vm/riscv64/stubs.cpp index 507248848c6bb..596034b07e432 100644 --- a/src/coreclr/vm/riscv64/stubs.cpp +++ b/src/coreclr/vm/riscv64/stubs.cpp @@ -201,7 +201,7 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState, context.S11 = unwoundstate->captureCalleeSavedRegisters[11] = baseState->captureCalleeSavedRegisters[11]; context.Gp = unwoundstate->captureCalleeSavedRegisters[12] = baseState->captureCalleeSavedRegisters[12]; context.Tp = unwoundstate->captureCalleeSavedRegisters[13] = baseState->captureCalleeSavedRegisters[13]; - context.Ra = NULL; // Filled by the unwinder + context.Ra = 0; // Filled by the unwinder context.Sp = baseState->captureSp; context.Pc = baseState->captureIp; @@ -225,7 +225,7 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState, nonVolContextPtrs.S11 = &unwoundstate->captureCalleeSavedRegisters[11]; nonVolContextPtrs.Gp = &unwoundstate->captureCalleeSavedRegisters[12]; nonVolContextPtrs.Tp = &unwoundstate->captureCalleeSavedRegisters[13]; - nonVolContextPtrs.Ra = NULL; // Filled by the unwinder + nonVolContextPtrs.Ra = 0; // Filled by the unwinder #endif // DACCESS_COMPILE @@ -384,7 +384,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat pRD->pCurrentContext->S11 = (DWORD64)(pUnwoundState->captureCalleeSavedRegisters[11]); pRD->pCurrentContext->Gp = (DWORD64)(pUnwoundState->captureCalleeSavedRegisters[12]); pRD->pCurrentContext->Tp = (DWORD64)(pUnwoundState->captureCalleeSavedRegisters[13]); - pRD->pCurrentContext->Ra = NULL; // Unwind again to get Caller's PC + pRD->pCurrentContext->Ra = 0; // Unwind again to get Caller's PC pRD->pCurrentContextPointers->Fp = pUnwoundState->ptrCalleeSavedRegisters[0]; pRD->pCurrentContextPointers->S1 = pUnwoundState->ptrCalleeSavedRegisters[1]; @@ -428,7 +428,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat pRD->pCurrentContext->S11 = m_MachState.ptrCalleeSavedRegisters[11] ? *m_MachState.ptrCalleeSavedRegisters[11] : m_MachState.captureCalleeSavedRegisters[11]; pRD->pCurrentContext->Gp = m_MachState.ptrCalleeSavedRegisters[12] ? *m_MachState.ptrCalleeSavedRegisters[12] : m_MachState.captureCalleeSavedRegisters[12]; pRD->pCurrentContext->Tp = m_MachState.ptrCalleeSavedRegisters[13] ? *m_MachState.ptrCalleeSavedRegisters[13] : m_MachState.captureCalleeSavedRegisters[13]; - pRD->pCurrentContext->Ra = NULL; // Unwind again to get Caller's PC + pRD->pCurrentContext->Ra = 0; // Unwind again to get Caller's PC #else // TARGET_UNIX pRD->pCurrentContext->Fp = *m_MachState.ptrCalleeSavedRegisters[0]; pRD->pCurrentContext->S1 = *m_MachState.ptrCalleeSavedRegisters[1]; @@ -444,7 +444,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat pRD->pCurrentContext->S11 = *m_MachState.ptrCalleeSavedRegisters[11]; pRD->pCurrentContext->Gp = *m_MachState.ptrCalleeSavedRegisters[12]; pRD->pCurrentContext->Tp = *m_MachState.ptrCalleeSavedRegisters[13]; - pRD->pCurrentContext->Ra = NULL; // Unwind again to get Caller's PC + pRD->pCurrentContext->Ra = 0; // Unwind again to get Caller's PC #endif #if !defined(DACCESS_COMPILE) diff --git a/src/coreclr/vm/riscv64/virtualcallstubcpu.hpp b/src/coreclr/vm/riscv64/virtualcallstubcpu.hpp index 2f39e4f313c58..77ceb4cb0a553 100644 --- a/src/coreclr/vm/riscv64/virtualcallstubcpu.hpp +++ b/src/coreclr/vm/riscv64/virtualcallstubcpu.hpp @@ -347,7 +347,7 @@ struct ResolveHolder _stub._resolveWorkerTarget = resolveWorkerTarget; _ASSERTE(resolveWorkerTarget == (PCODE)ResolveWorkerChainLookupAsmStub); - _ASSERTE(patcherTarget == NULL); + _ASSERTE(patcherTarget == (PCODE)NULL); #undef DATA_OFFSET #undef PC_REL_OFFSET diff --git a/src/coreclr/vm/stubmgr.cpp b/src/coreclr/vm/stubmgr.cpp index 2bcd39957555e..a916f00a27605 100644 --- a/src/coreclr/vm/stubmgr.cpp +++ b/src/coreclr/vm/stubmgr.cpp @@ -1415,7 +1415,7 @@ static BOOL TraceManagedThunk( #else PORTABILITY_ASSERT("TraceManagedThunk"); - destAddr = NULL; + destAddr = (PCODE)NULL; #endif LOG((LF_CORDB,LL_INFO10000, "TraceManagedThunk: ppbDest: %p\n", destAddr)); diff --git a/src/coreclr/vm/stubmgr.h b/src/coreclr/vm/stubmgr.h index ad105ccee0de9..679b4fe077ee8 100644 --- a/src/coreclr/vm/stubmgr.h +++ b/src/coreclr/vm/stubmgr.h @@ -797,7 +797,7 @@ class StubManagerHelpers return pContext->Lr; #else PORTABILITY_ASSERT("StubManagerHelpers::GetReturnAddress"); - return NULL; + return (TADDR)NULL; #endif } @@ -833,7 +833,7 @@ class StubManagerHelpers return pContext->X12; #else PORTABILITY_ASSERT("StubManagerHelpers::GetTailCallTarget"); - return NULL; + return (TADDR)NULL; #endif } @@ -849,7 +849,7 @@ class StubManagerHelpers return pContext->X12; #else PORTABILITY_ASSERT("StubManagerHelpers::GetHiddenArg"); - return NULL; + return (TADDR)NULL; #endif } @@ -879,7 +879,7 @@ class StubManagerHelpers return *((PCODE *)pContext->Fp + 1); #else PORTABILITY_ASSERT("StubManagerHelpers::GetRetAddrFromMulticastILStubFrame"); - return NULL; + return (TADDR)NULL; #endif } @@ -899,7 +899,7 @@ class StubManagerHelpers return pContext->X1; #else PORTABILITY_ASSERT("StubManagerHelpers::GetSecondArg"); - return NULL; + return (TADDR)NULL; #endif } diff --git a/src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp b/src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp index 513195a130533..ed2f2c6fc9ce1 100644 --- a/src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp +++ b/src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp @@ -615,7 +615,7 @@ void SlowPathELTProfiler::PrintBytes(const BYTE *bytes, size_t length) bool SlowPathELTProfiler::ValidateInt(UINT_PTR ptr, int expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -625,7 +625,7 @@ bool SlowPathELTProfiler::ValidateInt(UINT_PTR ptr, int expected) bool SlowPathELTProfiler::ValidateFloat(UINT_PTR ptr, float expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -635,7 +635,7 @@ bool SlowPathELTProfiler::ValidateFloat(UINT_PTR ptr, float expected) bool SlowPathELTProfiler::ValidateDouble(UINT_PTR ptr, double expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -645,7 +645,7 @@ bool SlowPathELTProfiler::ValidateDouble(UINT_PTR ptr, double expected) bool SlowPathELTProfiler::ValidateString(UINT_PTR ptr, const WCHAR *expected) { - if (ptr == NULL || *(void **)ptr == NULL) + if (ptr == (UINT_PTR)NULL || *(void **)ptr == NULL) { return false; } @@ -673,7 +673,7 @@ bool SlowPathELTProfiler::ValidateString(UINT_PTR ptr, const WCHAR *expected) bool SlowPathELTProfiler::ValidateMixedStruct(UINT_PTR ptr, MixedStruct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -684,7 +684,7 @@ bool SlowPathELTProfiler::ValidateMixedStruct(UINT_PTR ptr, MixedStruct expected bool SlowPathELTProfiler::ValidateLargeStruct(UINT_PTR ptr, LargeStruct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -702,7 +702,7 @@ bool SlowPathELTProfiler::ValidateLargeStruct(UINT_PTR ptr, LargeStruct expected bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp32x2Struct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -713,7 +713,7 @@ bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp32x2Struct bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp32x3Struct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -724,7 +724,7 @@ bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp32x3Struct bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp32x4Struct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -738,7 +738,7 @@ bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp32x4Struct bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp64x2Struct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -749,7 +749,7 @@ bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp64x2Struct bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp64x3Struct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -760,7 +760,7 @@ bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp64x3Struct bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp64x4Struct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -774,7 +774,7 @@ bool SlowPathELTProfiler::ValidateFloatingPointStruct(UINT_PTR ptr, Fp64x4Struct bool SlowPathELTProfiler::ValidateIntegerStruct(UINT_PTR ptr, IntegerStruct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -785,7 +785,7 @@ bool SlowPathELTProfiler::ValidateIntegerStruct(UINT_PTR ptr, IntegerStruct expe bool SlowPathELTProfiler::ValidateIntegerSseStruct(UINT_PTR ptr, IntegerSseStruct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -798,7 +798,7 @@ bool SlowPathELTProfiler::ValidateIntegerSseStruct(UINT_PTR ptr, IntegerSseStruc bool SlowPathELTProfiler::ValidateSseIntegerStruct(UINT_PTR ptr, SseIntegerStruct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -811,7 +811,7 @@ bool SlowPathELTProfiler::ValidateSseIntegerStruct(UINT_PTR ptr, SseIntegerStruc bool SlowPathELTProfiler::ValidateMixedSseStruct(UINT_PTR ptr, MixedSseStruct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -825,7 +825,7 @@ bool SlowPathELTProfiler::ValidateMixedSseStruct(UINT_PTR ptr, MixedSseStruct ex bool SlowPathELTProfiler::ValidateSseMixedStruct(UINT_PTR ptr, SseMixedStruct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } @@ -839,7 +839,7 @@ bool SlowPathELTProfiler::ValidateSseMixedStruct(UINT_PTR ptr, SseMixedStruct ex bool SlowPathELTProfiler::ValidateMixedMixedStruct(UINT_PTR ptr, MixedMixedStruct expected) { - if (ptr == NULL) + if (ptr == (UINT_PTR)NULL) { return false; } diff --git a/src/tests/profiler/native/gcprofiler/gcprofiler.cpp b/src/tests/profiler/native/gcprofiler/gcprofiler.cpp index ac94f78dd2495..45d810bbf21f0 100644 --- a/src/tests/profiler/native/gcprofiler/gcprofiler.cpp +++ b/src/tests/profiler/native/gcprofiler/gcprofiler.cpp @@ -115,7 +115,7 @@ HRESULT GCProfiler::ObjectReferences(ObjectID objectId, ClassID classId, ULONG c for (ULONG i = 0; i < cObjectRefs; ++i) { ObjectID obj = objectRefIds[i]; - if (obj != NULL) + if (obj != 0) { _objectReferencesSeen.insert(obj); } @@ -131,7 +131,7 @@ HRESULT GCProfiler::RootReferences(ULONG cRootRefs, ObjectID rootRefIds[]) for (ULONG i = 0; i < cRootRefs; ++i) { ObjectID obj = rootRefIds[i]; - if (obj != NULL) + if (obj != 0) { _rootReferencesSeen.insert(obj); } diff --git a/src/tests/profiler/native/getappdomainstaticaddress/getappdomainstaticaddress.cpp b/src/tests/profiler/native/getappdomainstaticaddress/getappdomainstaticaddress.cpp index c7c00addd194a..94ba4ae7ffa61 100644 --- a/src/tests/profiler/native/getappdomainstaticaddress/getappdomainstaticaddress.cpp +++ b/src/tests/profiler/native/getappdomainstaticaddress/getappdomainstaticaddress.cpp @@ -255,8 +255,8 @@ HRESULT GetAppDomainStaticAddress::ClassLoadFinished(ClassID classId, HRESULT hr HRESULT hr = S_OK; - ThreadID threadId = NULL; - AppDomainID appDomainId = NULL; + ThreadID threadId = 0; + AppDomainID appDomainId = 0; CorElementType baseElemType; ClassID baseClassId; ULONG cRank; @@ -298,7 +298,7 @@ HRESULT GetAppDomainStaticAddress::ClassLoadFinished(ClassID classId, HRESULT hr &modId, NULL, NULL, - NULL, + 0, NULL, NULL); if (FAILED(hr)) @@ -390,12 +390,12 @@ HRESULT GetAppDomainStaticAddress::GarbageCollectionFinished() fflush(stdout); } - ModuleID classModuleId = NULL; + ModuleID classModuleId = 0; hr = pCorProfilerInfo->GetClassIDInfo2(classId, &classModuleId, NULL, NULL, - NULL, + 0, NULL, NULL); if (FAILED(hr)) @@ -424,9 +424,9 @@ HRESULT GetAppDomainStaticAddress::GarbageCollectionFinished() } HCORENUM hEnum = NULL; - mdTypeDef token = NULL; + mdTypeDef token = 0; mdFieldDef fieldTokens[SHORT_LENGTH]; - ULONG cTokens = NULL; + ULONG cTokens = 0; if (DEBUG_OUT) { @@ -439,7 +439,7 @@ HRESULT GetAppDomainStaticAddress::GarbageCollectionFinished() NULL, &token, NULL, - NULL, + 0, NULL, NULL); if (hr == CORPROF_E_DATAINCOMPLETE) @@ -469,13 +469,13 @@ HRESULT GetAppDomainStaticAddress::GarbageCollectionFinished() for (ULONG i = 0; i < cTokens; i++) { - mdTypeDef fieldClassToken = NULL; + mdTypeDef fieldClassToken = 0; WCHAR tokenName[256]; - ULONG nameLength = NULL; - DWORD fieldAttributes = NULL; - PCCOR_SIGNATURE pvSig = NULL; - ULONG cbSig = NULL; - DWORD corElementType = NULL; + ULONG nameLength = 0; + DWORD fieldAttributes = 0; + PCCOR_SIGNATURE pvSig = 0; + ULONG cbSig = 0; + DWORD corElementType = 0; hr = pIMDImport->GetFieldProps(fieldTokens[i], &fieldClassToken, diff --git a/src/tests/profiler/native/handlesprofiler/handlesprofiler.cpp b/src/tests/profiler/native/handlesprofiler/handlesprofiler.cpp index 78ad8e4a7827e..43c55ef0d9709 100644 --- a/src/tests/profiler/native/handlesprofiler/handlesprofiler.cpp +++ b/src/tests/profiler/native/handlesprofiler/handlesprofiler.cpp @@ -139,7 +139,7 @@ ObjectID HandlesProfiler::CheckIfAlive(const char* name, ObjectHandleID handle, { _failures++; printf("HandlesProfiler::CheckIfAlive(%s): FAIL: null handle.\n", name); - return NULL; + return 0; } ObjectID objectId{0}; @@ -148,12 +148,12 @@ ObjectID HandlesProfiler::CheckIfAlive(const char* name, ObjectHandleID handle, { _failures++; printf("HandlesProfiler::CheckIfAlive(%s): FAIL: GetObjectIDFromHandle failed.\n", name); - return NULL; + return 0; } if (shouldBeAlive) { - if (objectId == NULL) + if (objectId == 0) { _failures++; printf("HandlesProfiler::CheckIfAlive(%s): FAIL: the object should be alive.\n", name); @@ -179,7 +179,7 @@ ObjectID HandlesProfiler::CheckIfAlive(const char* name, ObjectHandleID handle, } else { - if (objectId != NULL) + if (objectId != 0) { _failures++; printf("HandlesProfiler::CheckIfAlive(%s): FAIL: the object should not be alive anymore.\n", name); @@ -190,7 +190,7 @@ ObjectID HandlesProfiler::CheckIfAlive(const char* name, ObjectHandleID handle, } } - return NULL; + return 0; } HRESULT HandlesProfiler::GarbageCollectionFinished() diff --git a/src/tests/profiler/native/handlesprofiler/handlesprofiler.h b/src/tests/profiler/native/handlesprofiler/handlesprofiler.h index 43653521eb2c6..8c94462c30ac8 100644 --- a/src/tests/profiler/native/handlesprofiler/handlesprofiler.h +++ b/src/tests/profiler/native/handlesprofiler/handlesprofiler.h @@ -15,7 +15,7 @@ class HandlesProfiler : public Profiler _weakHandle(NULL), _strongHandle(NULL), _pinnedHandle(NULL), - _pinnedObject(NULL) + _pinnedObject(0) {} static GUID GetClsid(); diff --git a/src/tests/profiler/native/profiler.cpp b/src/tests/profiler/native/profiler.cpp index e0a63d3d4c8ee..9ea3088bedcc5 100644 --- a/src/tests/profiler/native/profiler.cpp +++ b/src/tests/profiler/native/profiler.cpp @@ -592,12 +592,12 @@ String Profiler::GetFunctionIDName(FunctionID funcId) String name; - ClassID classId = NULL; - ModuleID moduleId = NULL; - mdToken token = NULL; - ULONG32 nTypeArgs = NULL; + ClassID classId = 0; + ModuleID moduleId = 0; + mdToken token = 0; + ULONG32 nTypeArgs = 0; ClassID typeArgs[SHORT_LENGTH]; - COR_PRF_FRAME_INFO frameInfo = NULL; + COR_PRF_FRAME_INFO frameInfo = 0; HRESULT hr = S_OK; hr = pCorProfilerInfo->GetFunctionInfo2(funcId, @@ -671,7 +671,7 @@ String Profiler::GetClassIDName(ClassID classId) ClassID typeArgs[SHORT_LENGTH]; HRESULT hr = S_OK; - if (classId == NULL) + if (classId == 0) { printf("FAIL: Null ClassID passed in\n"); return WCHAR(""); @@ -757,7 +757,7 @@ String Profiler::GetModuleIDName(ModuleID modId) ULONG nameLength = 0; AssemblyID assemID; - if (modId == NULL) + if (modId == 0) { printf("FAIL: Null ModuleID\n"); return WCHAR("NullModuleIDPassedIn"); diff --git a/src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp b/src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp index ab824f48ab066..b93d3bc6926c9 100644 --- a/src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp +++ b/src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp @@ -194,7 +194,7 @@ bool ReJITProfiler::FunctionSeen(FunctionID functionId) for (auto &&address : codeStartAddresses) { - if (address == NULL) + if (address == (UINT_PTR)NULL) { printf("Found NULL start address from GetNativeCodeStartAddresses.\n"); _failures++; @@ -477,12 +477,12 @@ FunctionID ReJITProfiler::GetFunctionIDFromToken(ModuleID module, mdMethodDef to mdMethodDef ReJITProfiler::GetMethodDefForFunction(FunctionID functionId) { - ClassID classId = NULL; - ModuleID moduleId = NULL; - mdToken token = NULL; - ULONG32 nTypeArgs = NULL; + ClassID classId = 0; + ModuleID moduleId = 0; + mdToken token = 0; + ULONG32 nTypeArgs = 0; ClassID typeArgs[SHORT_LENGTH]; - COR_PRF_FRAME_INFO frameInfo = NULL; + COR_PRF_FRAME_INFO frameInfo = 0; HRESULT hr = S_OK; hr = pCorProfilerInfo->GetFunctionInfo2(functionId, @@ -505,12 +505,12 @@ mdMethodDef ReJITProfiler::GetMethodDefForFunction(FunctionID functionId) ModuleID ReJITProfiler::GetModuleIDForFunction(FunctionID functionId) { - ClassID classId = NULL; - ModuleID moduleId = NULL; - mdToken token = NULL; - ULONG32 nTypeArgs = NULL; + ClassID classId = 0; + ModuleID moduleId = 0; + mdToken token = 0; + ULONG32 nTypeArgs = 0; ClassID typeArgs[SHORT_LENGTH]; - COR_PRF_FRAME_INFO frameInfo = NULL; + COR_PRF_FRAME_INFO frameInfo = 0; HRESULT hr = S_OK; hr = pCorProfilerInfo->GetFunctionInfo2(functionId,