summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2019-03-11 16:08:50 +0100
committerGitHub <noreply@github.com>2019-03-11 16:08:50 +0100
commitf9820b7c45ed1ae99fef54944727e98bacbd2a2a (patch)
tree878e92193d8fdcf641ac689051a14695a9a8d6d4
parent123422de218d6ca5c36cbb7f34ece95dcae333da (diff)
parent5a97d8e9f14763a4ff90d14d045f0173e8d4b944 (diff)
downloadcoreclr-f9820b7c45ed1ae99fef54944727e98bacbd2a2a.tar.gz
coreclr-f9820b7c45ed1ae99fef54944727e98bacbd2a2a.tar.bz2
coreclr-f9820b7c45ed1ae99fef54944727e98bacbd2a2a.zip
Merge pull request #23093 from franksinankaya/gcc_warnings_9
GCC Signed compare and Narrowing warnings
-rw-r--r--src/ToolBox/SOS/Strike/disasm.cpp2
-rw-r--r--src/ToolBox/SOS/Strike/strike.cpp8
-rw-r--r--src/ToolBox/SOS/Strike/util.cpp2
-rw-r--r--src/ToolBox/superpmi/mcs/verbdumptoc.cpp2
-rw-r--r--src/ToolBox/superpmi/superpmi-shared/compileresult.cpp2
-rw-r--r--src/ToolBox/superpmi/superpmi-shared/lightweightmap.h2
-rw-r--r--src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp4
-rw-r--r--src/ToolBox/superpmi/superpmi-shared/tocfile.cpp2
-rw-r--r--src/ToolBox/superpmi/superpmi/neardiffer.cpp8
-rw-r--r--src/classlibnative/bcltype/system.cpp2
-rw-r--r--src/debug/daccess/dacdbiimpl.cpp8
-rw-r--r--src/debug/daccess/nidump.cpp2
-rw-r--r--src/debug/daccess/request.cpp2
-rw-r--r--src/debug/di/module.cpp4
-rw-r--r--src/debug/di/rsclass.cpp4
-rw-r--r--src/debug/di/rstype.cpp2
-rw-r--r--src/debug/inc/dacdbistructures.h2
-rw-r--r--src/debug/inc/dacdbistructures.inl6
-rw-r--r--src/debug/shared/dbgtransportsession.cpp4
-rw-r--r--src/gc/gc.cpp2
-rw-r--r--src/gc/unix/gcenv.unix.cpp4
-rw-r--r--src/gcdump/gcdumpnonx86.cpp2
-rw-r--r--src/inc/clrconfigvalues.h6
-rw-r--r--src/utilcode/util.cpp2
-rw-r--r--src/vm/amd64/profiler.cpp2
-rw-r--r--src/vm/argdestination.h2
-rw-r--r--src/vm/callhelpers.cpp4
-rw-r--r--src/vm/ceeload.cpp4
-rw-r--r--src/vm/codeman.cpp4
-rw-r--r--src/vm/codeversion.cpp8
-rw-r--r--src/vm/codeversion.h2
-rw-r--r--src/vm/comdelegate.cpp4
-rw-r--r--src/vm/dllimport.cpp6
-rw-r--r--src/vm/exceptionhandling.cpp2
-rw-r--r--src/vm/genericdict.cpp2
-rw-r--r--src/vm/i386/stublinkerx86.cpp2
-rw-r--r--src/vm/jithelpers.cpp4
-rw-r--r--src/vm/jithost.cpp2
-rw-r--r--src/vm/jitinterface.cpp2
-rw-r--r--src/vm/managedmdimport.cpp2
-rw-r--r--src/vm/methodtablebuilder.cpp2
-rw-r--r--src/vm/readytoruninfo.cpp4
-rw-r--r--src/vm/rejit.cpp2
-rw-r--r--src/vm/rexcep.h2
-rw-r--r--src/vm/util.cpp2
-rw-r--r--src/vm/yieldprocessornormalized.cpp2
-rw-r--r--src/zap/zapcode.cpp2
-rw-r--r--src/zap/zapimage.cpp2
-rw-r--r--src/zap/zapimport.cpp2
-rw-r--r--src/zap/zapinfo.cpp2
50 files changed, 79 insertions, 79 deletions
diff --git a/src/ToolBox/SOS/Strike/disasm.cpp b/src/ToolBox/SOS/Strike/disasm.cpp
index f82c38ac4d..ceb0fed30d 100644
--- a/src/ToolBox/SOS/Strike/disasm.cpp
+++ b/src/ToolBox/SOS/Strike/disasm.cpp
@@ -530,7 +530,7 @@ INT_PTR ParseHexNumber (__in_z char *ptr, ___out char **endptr)
endptr1 = endptr2;
}
// if the hex number was specified as 000006fbf9b70f50, an overflow occurred
- else if (ULONG_MAX == value1 && errno == ERANGE)
+ else if ((INT_PTR)ULONG_MAX == value1 && errno == ERANGE)
{
if (!strncmp(ptr, "0x", 2))
ptr += 2;
diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
index f85957ee14..b25d340771 100644
--- a/src/ToolBox/SOS/Strike/strike.cpp
+++ b/src/ToolBox/SOS/Strike/strike.cpp
@@ -2157,7 +2157,7 @@ DECLARE_API(DumpDelegate)
DacpObjectData objData;
if (objData.Request(g_sos, invocationList) == S_OK &&
objData.ObjectType == OBJ_ARRAY &&
- invocationCount <= objData.dwNumComponents)
+ invocationCount <= (int)objData.dwNumComponents)
{
for (int i = 0; i < invocationCount; i++)
{
@@ -2363,7 +2363,7 @@ Done:
// Overload that mirrors the code above when the ExceptionObjectData was already retrieved from LS
BOOL IsAsyncException(const DacpExceptionObjectData & excData)
{
- if (excData.XCode != EXCEPTION_COMPLUS)
+ if ((DWORD)excData.XCode != EXCEPTION_COMPLUS)
return TRUE;
HRESULT ehr = excData.HResult;
@@ -4605,7 +4605,7 @@ DECLARE_API(DumpAsync)
DacpObjectData objData;
if (objData.Request(g_sos, TO_CDADDR(listItemsPtr)) == S_OK && objData.ObjectType == OBJ_ARRAY)
{
- for (int i = 0; i < objData.dwNumComponents; i++)
+ for (SIZE_T i = 0; i < objData.dwNumComponents; i++)
{
CLRDATA_ADDRESS elementPtr;
MOVE(elementPtr, TO_CDADDR(objData.ArrayDataPtr + (i * objData.dwComponentSize)));
@@ -15544,7 +15544,7 @@ GetStackFrame(CONTEXT* context, ULONG numNativeFrames)
if (FAILED(hr))
{
PDEBUG_STACK_FRAME frame = &g_Frames[0];
- for (int i = 0; i < numNativeFrames; i++, frame++) {
+ for (unsigned int i = 0; i < numNativeFrames; i++, frame++) {
if (frame->InstructionOffset == context->Rip)
{
if ((i + 1) >= numNativeFrames) {
diff --git a/src/ToolBox/SOS/Strike/util.cpp b/src/ToolBox/SOS/Strike/util.cpp
index 7098cc8019..0a286d2e6f 100644
--- a/src/ToolBox/SOS/Strike/util.cpp
+++ b/src/ToolBox/SOS/Strike/util.cpp
@@ -1726,7 +1726,7 @@ int GetValueFieldOffset(CLRDATA_ADDRESS cdaMT, __in_z LPCWSTR wszFieldName, Dacp
if (dmtd.ParentMethodTable)
{
DWORD retVal = GetValueFieldOffset(dmtd.ParentMethodTable, wszFieldName, pDacpFieldDescData);
- if (retVal != NOT_FOUND)
+ if (retVal != (DWORD)NOT_FOUND)
{
// Return in case of error or success. Fall through for field-not-found.
return retVal;
diff --git a/src/ToolBox/superpmi/mcs/verbdumptoc.cpp b/src/ToolBox/superpmi/mcs/verbdumptoc.cpp
index f9cc69effa..a2366225c2 100644
--- a/src/ToolBox/superpmi/mcs/verbdumptoc.cpp
+++ b/src/ToolBox/superpmi/mcs/verbdumptoc.cpp
@@ -20,7 +20,7 @@ int verbDumpToc::DoWork(const char* nameOfInput)
const TOCElement* te = tf.GetElementPtr(i);
printf("%4u: %016llX ", te->Number, te->Offset);
- for (int j = 0; j < sizeof(te->Hash); j++)
+ for (size_t j = 0; j < sizeof(te->Hash); j++)
{
printf("%02x ", te->Hash[j]);
}
diff --git a/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp b/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp
index 70f54d2c4c..251666a823 100644
--- a/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp
+++ b/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp
@@ -1043,7 +1043,7 @@ bool CompileResult::fndRecordCallSiteSigInfo(ULONG instrOffset, CORINFO_SIG_INFO
Agnostic_RecordCallSite value = RecordCallSite->Get(instrOffset);
- if (value.callSig.callConv == -1)
+ if (value.callSig.callConv == (DWORD)-1)
return false;
pCallSig->callConv = (CorInfoCallConv)value.callSig.callConv;
diff --git a/src/ToolBox/superpmi/superpmi-shared/lightweightmap.h b/src/ToolBox/superpmi/superpmi-shared/lightweightmap.h
index 3a425124ea..069287c1d3 100644
--- a/src/ToolBox/superpmi/superpmi-shared/lightweightmap.h
+++ b/src/ToolBox/superpmi/superpmi-shared/lightweightmap.h
@@ -345,7 +345,7 @@ public:
return false; // found it. return position /////
}
insert = first;
- if (insert != first)
+ if (insert != (unsigned int)first)
{
LogDebug("index = %u f %u mid = %u l %u***************************", insert, first, mid, last);
__debugbreak();
diff --git a/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp b/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
index 96ecb8d5f1..a6b284488a 100644
--- a/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
+++ b/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
@@ -3547,7 +3547,7 @@ void MethodContext::recGetClassGClayout(CORINFO_CLASS_HANDLE cls, BYTE* gcPtrs,
void MethodContext::dmpGetClassGClayout(DWORDLONG key, const Agnostic_GetClassGClayout& value)
{
printf("GetClassGCLayout key %016llX, value len %u cnt %u {", key, value.len, value.valCount);
- if (value.gcPtrs_Index != -1)
+ if (value.gcPtrs_Index != (DWORD)-1)
{
BYTE* ptr = (BYTE*)GetClassGClayout->GetBuffer(value.gcPtrs_Index);
for (unsigned int i = 0; i < value.len; i++)
@@ -3572,7 +3572,7 @@ unsigned MethodContext::repGetClassGClayout(CORINFO_CLASS_HANDLE cls, BYTE* gcPt
unsigned int len = (unsigned int)value.len;
unsigned int index = (unsigned int)value.gcPtrs_Index;
- if (index != -1)
+ if (index != (unsigned int)-1)
{
BYTE* ptr = (BYTE*)GetClassGClayout->GetBuffer(index);
for (unsigned int i = 0; i < len; i++)
diff --git a/src/ToolBox/superpmi/superpmi-shared/tocfile.cpp b/src/ToolBox/superpmi/superpmi-shared/tocfile.cpp
index f0979fc5c3..1994a3bcd7 100644
--- a/src/ToolBox/superpmi/superpmi-shared/tocfile.cpp
+++ b/src/ToolBox/superpmi/superpmi-shared/tocfile.cpp
@@ -47,7 +47,7 @@ void TOCFile::LoadToc(const char* inputFileName, bool validate)
// Get the last 4 byte token (more abuse of LARGE_INTEGER)
if (!ReadFile(hIndex, &val.u.HighPart, sizeof(DWORD), &read, nullptr) || (read != sizeof(DWORD)) ||
- (val.u.LowPart != val.u.HighPart))
+ (val.u.LowPart != (DWORD)val.u.HighPart))
{
CloseHandle(hIndex);
this->Clear();
diff --git a/src/ToolBox/superpmi/superpmi/neardiffer.cpp b/src/ToolBox/superpmi/superpmi/neardiffer.cpp
index aa1722eb1a..bb0c67fc34 100644
--- a/src/ToolBox/superpmi/superpmi/neardiffer.cpp
+++ b/src/ToolBox/superpmi/superpmi/neardiffer.cpp
@@ -330,7 +330,7 @@ bool NearDiffer::compareOffsets(
// VSD calling case.
size_t Offset1 = (ipRelOffset1 - 8);
- if (data->cr->CallTargetTypes->GetIndex((DWORDLONG)Offset1) != (DWORD)-1)
+ if (data->cr->CallTargetTypes->GetIndex((DWORDLONG)Offset1) != -1)
{
// This logging is too noisy, so disable it.
// LogVerbose("Found VSD callsite, did softer compare than ideal");
@@ -340,13 +340,13 @@ bool NearDiffer::compareOffsets(
// x86 VSD calling cases.
size_t Offset1b = (size_t)offset1 - 4;
size_t Offset2b = (size_t)offset2;
- if (data->cr->CallTargetTypes->GetIndex((DWORDLONG)Offset1b) != (DWORD)-1)
+ if (data->cr->CallTargetTypes->GetIndex((DWORDLONG)Offset1b) != -1)
{
// This logging is too noisy, so disable it.
// LogVerbose("Found VSD callsite, did softer compare than ideal");
return true;
}
- if (data->cr->CallTargetTypes->GetIndex((DWORDLONG)Offset2b) != (DWORD)-1)
+ if (data->cr->CallTargetTypes->GetIndex((DWORDLONG)Offset2b) != -1)
{
// This logging is too noisy, so disable it.
// LogVerbose("Found VSD callsite, did softer compare than ideal");
@@ -368,7 +368,7 @@ bool NearDiffer::compareOffsets(
return true;
realTargetAddr = (size_t)data->cr->searchAddressMap((void*)(gOffset2));
- if (realTargetAddr != -1) // we know this was passed out as a bbloc
+ if (realTargetAddr != (size_t)-1) // we know this was passed out as a bbloc
return true;
return false;
diff --git a/src/classlibnative/bcltype/system.cpp b/src/classlibnative/bcltype/system.cpp
index 37c8b11387..8f3b428a58 100644
--- a/src/classlibnative/bcltype/system.cpp
+++ b/src/classlibnative/bcltype/system.cpp
@@ -346,7 +346,7 @@ INT32 QCALLTYPE SystemNative::GetProcessorCount()
#ifdef FEATURE_PAL
uint32_t cpuLimit;
- if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < processorCount)
+ if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < (uint32_t)processorCount)
processorCount = cpuLimit;
#endif
diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp
index a008dc1e38..a68a50d51e 100644
--- a/src/debug/daccess/dacdbiimpl.cpp
+++ b/src/debug/daccess/dacdbiimpl.cpp
@@ -1734,7 +1734,7 @@ void DacDbiInterfaceImpl::CollectFields(TypeHandle thExact,
FALSE); // don't fixup EnC (we can't, we're stopped)
PTR_FieldDesc pCurrentFD;
- int index = 0;
+ unsigned int index = 0;
while (((pCurrentFD = fdIterator.Next()) != NULL) && (index < pFieldList->Count()))
{
// fill in the pCurrentEntry structure
@@ -3097,7 +3097,7 @@ TypeHandle DacDbiInterfaceImpl::GetExactFnPtrTypeHandle(ArgInfoList * pArgInfo)
// convert the type information for each parameter to its corresponding type handle
// and store it in the list
- for (int i = 0; i < pArgInfo->Count(); i++)
+ for (unsigned int i = 0; i < pArgInfo->Count(); i++)
{
pInst[i] = BasicTypeInfoToTypeHandle(&((*pArgInfo)[i]));
}
@@ -3316,7 +3316,7 @@ void DacDbiInterfaceImpl::GetTypeHandleParams(VMPTR_AppDomain vmAppDomain,
pParams->Alloc(typeHandle.GetNumGenericArgs());
// collect type information for each type parameter
- for (int i = 0; i < pParams->Count(); ++i)
+ for (unsigned int i = 0; i < pParams->Count(); ++i)
{
VMPTR_TypeHandle thInst = VMPTR_TypeHandle::NullPtr();
thInst.SetDacTargetPtr(typeHandle.GetInstantiation()[i].AsTAddr());
@@ -3597,7 +3597,7 @@ void DacDbiInterfaceImpl::GetCachedWinRTTypesForIIDs(
{
pTypes->Alloc(iids.Count());
- for (int i = 0; i < iids.Count(); ++i)
+ for (unsigned int i = 0; i < iids.Count(); ++i)
{
// There is the possiblity that we'll get this far with a dump and not fail, but still
// not be able to get full info for a particular param.
diff --git a/src/debug/daccess/nidump.cpp b/src/debug/daccess/nidump.cpp
index 37de104563..d7d90413d7 100644
--- a/src/debug/daccess/nidump.cpp
+++ b/src/debug/daccess/nidump.cpp
@@ -2462,7 +2462,7 @@ const NativeImageDumper::Dependency *NativeImageDumper::GetDependencyForFixup(RV
{
unsigned idx = DacSigUncompressData(sig);
- _ASSERTE(idx >= 0 && idx < (int)m_numImports);
+ _ASSERTE(idx >= 0 && idx < m_numImports);
return OpenImport(idx)->dependency;
}
diff --git a/src/debug/daccess/request.cpp b/src/debug/daccess/request.cpp
index 995cfcab74..167069ac39 100644
--- a/src/debug/daccess/request.cpp
+++ b/src/debug/daccess/request.cpp
@@ -2854,7 +2854,7 @@ ClrDataAccess::GetGCHeapList(unsigned int count, CLRDATA_ADDRESS heaps[], unsign
#if !defined(FEATURE_SVR_GC)
_ASSERTE(0);
#else // !defined(FEATURE_SVR_GC)
- int heapCount = GCHeapCount();
+ unsigned int heapCount = GCHeapCount();
if (pNeeded)
*pNeeded = heapCount;
diff --git a/src/debug/di/module.cpp b/src/debug/di/module.cpp
index 1263e710e4..5fb335e6d5 100644
--- a/src/debug/di/module.cpp
+++ b/src/debug/di/module.cpp
@@ -4460,7 +4460,7 @@ HRESULT CordbNativeCode::EnumerateVariableHomes(ICorDebugVariableHomeEnum **ppEn
const DacDbiArrayList<ICorDebugInfo::NativeVarInfo> *pOffsetInfoList = m_nativeVarData.GetOffsetInfoList();
_ASSERTE(pOffsetInfoList != NULL);
DWORD countHomes = 0;
- for (int i = 0; i < pOffsetInfoList->Count(); i++)
+ for (unsigned int i = 0; i < pOffsetInfoList->Count(); i++)
{
const ICorDebugInfo::NativeVarInfo *pNativeVarInfo = &((*pOffsetInfoList)[i]);
_ASSERTE(pNativeVarInfo != NULL);
@@ -4477,7 +4477,7 @@ HRESULT CordbNativeCode::EnumerateVariableHomes(ICorDebugVariableHomeEnum **ppEn
rsHomes = new RSSmartPtr<CordbVariableHome>[countHomes];
DWORD varHomeInd = 0;
- for (int i = 0; i < pOffsetInfoList->Count(); i++)
+ for (unsigned int i = 0; i < pOffsetInfoList->Count(); i++)
{
const ICorDebugInfo::NativeVarInfo *pNativeVarInfo = &((*pOffsetInfoList)[i]);
diff --git a/src/debug/di/rsclass.cpp b/src/debug/di/rsclass.cpp
index bfd02c75ec..662e2c0cd6 100644
--- a/src/debug/di/rsclass.cpp
+++ b/src/debug/di/rsclass.cpp
@@ -808,7 +808,7 @@ void CordbClass::Init(ClassLoadLevel desiredLoadLevel)
BOOL CordbClass::GotUnallocatedStatic(DacDbiArrayList<FieldData> * pFieldList)
{
BOOL fGotUnallocatedStatic = FALSE;
- int count = 0;
+ unsigned int count = 0;
while ((count < pFieldList->Count()) && !fGotUnallocatedStatic )
{
if ((*pFieldList)[count].OkToGetOrSetStaticAddress() &&
@@ -1145,7 +1145,7 @@ HRESULT CordbClass::SearchFieldInfo(
FieldData **ppFieldData
)
{
- int i;
+ unsigned int i;
IMetaDataImport * pImport = pModule->GetMetaDataImporter(); // throws
diff --git a/src/debug/di/rstype.cpp b/src/debug/di/rstype.cpp
index f180982404..a85ab0dcc4 100644
--- a/src/debug/di/rstype.cpp
+++ b/src/debug/di/rstype.cpp
@@ -1382,7 +1382,7 @@ HRESULT CordbType::InstantiateFromTypeHandle(CordbAppDomain * pAppDomain,
// means it will simply assert IsNeutered.
DacDbiArrayList<CordbType *> typeList;
typeList.Alloc(params.Count());
- for (int i = 0; i < params.Count(); ++i)
+ for (unsigned int i = 0; i < params.Count(); ++i)
{
IfFailThrow(TypeDataToType(pAppDomain, &(params[i]), &(typeList[i])));
}
diff --git a/src/debug/inc/dacdbistructures.h b/src/debug/inc/dacdbistructures.h
index fc894f3834..285537d71d 100644
--- a/src/debug/inc/dacdbistructures.h
+++ b/src/debug/inc/dacdbistructures.h
@@ -99,7 +99,7 @@ public:
// returns the number of elements in the list
- int Count() const;
+ unsigned int Count() const;
// @dbgtodo Mac - cleaner way to expose this for serialization?
void PrepareForDeserialize()
diff --git a/src/debug/inc/dacdbistructures.inl b/src/debug/inc/dacdbistructures.inl
index 58166c1017..fe1ff98058 100644
--- a/src/debug/inc/dacdbistructures.inl
+++ b/src/debug/inc/dacdbistructures.inl
@@ -154,7 +154,7 @@ T & DacDbiArrayList<T>::operator [](int i)
// get the number of elements in the list
template<class T>
inline
-int DacDbiArrayList<T>::Count() const
+unsigned int DacDbiArrayList<T>::Count() const
{
return m_nEntries;
}
@@ -392,7 +392,7 @@ inline
void SequencePoints::CopyAndSortSequencePoints(const ICorDebugInfo::OffsetMapping mapCopy[])
{
// copy information to pSeqPoint and set end offsets
- int i;
+ unsigned int i;
ULONG32 lastILOffset = 0;
@@ -405,7 +405,7 @@ void SequencePoints::CopyAndSortSequencePoints(const ICorDebugInfo::OffsetMappin
if (i < m_map.Count() - 1)
{
// We need to not use CALL_INSTRUCTION's IL start offset.
- int j = i + 1;
+ unsigned int j = i + 1;
while ((mapCopy[j].source & call_inst) == call_inst && j < m_map.Count()-1)
j++;
diff --git a/src/debug/shared/dbgtransportsession.cpp b/src/debug/shared/dbgtransportsession.cpp
index f42d259e4c..e4dd78cf18 100644
--- a/src/debug/shared/dbgtransportsession.cpp
+++ b/src/debug/shared/dbgtransportsession.cpp
@@ -836,7 +836,7 @@ bool DbgTransportSession::SendBlock(PBYTE pbBuffer, DWORD cbBuffer)
if (DBG_TRANSPORT_SHOULD_INJECT_FAULT(Send))
fSuccess = false;
else
- fSuccess = (m_pipe.Write(pbBuffer, cbBuffer) == cbBuffer);
+ fSuccess = ((DWORD)m_pipe.Write(pbBuffer, cbBuffer) == cbBuffer);
if (!fSuccess)
{
@@ -867,7 +867,7 @@ bool DbgTransportSession::ReceiveBlock(PBYTE pbBuffer, DWORD cbBuffer)
if (DBG_TRANSPORT_SHOULD_INJECT_FAULT(Receive))
fSuccess = false;
else
- fSuccess = (m_pipe.Read(pbBuffer, cbBuffer) == cbBuffer);
+ fSuccess = ((DWORD)m_pipe.Read(pbBuffer, cbBuffer) == cbBuffer);
if (!fSuccess)
{
diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp
index a26ad8d24f..9c82c11536 100644
--- a/src/gc/gc.cpp
+++ b/src/gc/gc.cpp
@@ -24392,7 +24392,7 @@ void gc_heap::relocate_shortened_survivor_helper (uint8_t* plug, uint8_t* plug_e
while (x < plug_end)
{
- if (check_short_obj_p && ((plug_end - x) < min_pre_pin_obj_size))
+ if (check_short_obj_p && ((plug_end - x) < (DWORD)min_pre_pin_obj_size))
{
dprintf (3, ("last obj %Ix is short", x));
diff --git a/src/gc/unix/gcenv.unix.cpp b/src/gc/unix/gcenv.unix.cpp
index 693cfa8c86..8148f6ff29 100644
--- a/src/gc/unix/gcenv.unix.cpp
+++ b/src/gc/unix/gcenv.unix.cpp
@@ -485,7 +485,7 @@ bool GCToOSInterface::GetCurrentProcessAffinityMask(uintptr_t* processAffinityMa
{
uintptr_t processMask = 0;
- for (int i = 0; i < g_logicalCpuCount; i++)
+ for (unsigned int i = 0; i < g_logicalCpuCount; i++)
{
if (CPU_ISSET(i, &cpuSet))
{
@@ -536,7 +536,7 @@ uint32_t GCToOSInterface::GetCurrentProcessCpuCount()
pmask &= smask;
- int count = 0;
+ unsigned int count = 0;
while (pmask)
{
pmask &= (pmask - 1);
diff --git a/src/gcdump/gcdumpnonx86.cpp b/src/gcdump/gcdumpnonx86.cpp
index 83624c76b7..5707926229 100644
--- a/src/gcdump/gcdumpnonx86.cpp
+++ b/src/gcdump/gcdumpnonx86.cpp
@@ -213,7 +213,7 @@ BOOL StackSlotStateChangeCallback (
if (pState->fAnythingPrinted)
pState->pfnPrintf("\n");
- if ((CodeOffset == -2) && !pState->fAnythingPrinted)
+ if ((CodeOffset == (UINT32)-2) && !pState->fAnythingPrinted)
pState->pfnPrintf("Untracked:");
else
pState->pfnPrintf("%08x", CodeOffset);
diff --git a/src/inc/clrconfigvalues.h b/src/inc/clrconfigvalues.h
index 201a123211..a8b4270d4d 100644
--- a/src/inc/clrconfigvalues.h
+++ b/src/inc/clrconfigvalues.h
@@ -522,17 +522,17 @@ CONFIG_DWORD_INFO_EX(INTERNAL_SymDiffDump, W("SymDiffDump"), 0, "Used to create
/// NGEN
///
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_NGen_JitName, W("NGen_JitName"), "", CLRConfig::REGUTIL_default)
-RETAIL_CONFIG_DWORD_INFO_EX(UNSUPPORTED_NGenFramed, W("NGenFramed"), -1, "Same as JitFramed, but for ngen", CLRConfig::REGUTIL_default)
+RETAIL_CONFIG_DWORD_INFO_EX(UNSUPPORTED_NGenFramed, W("NGenFramed"), (DWORD)-1, "Same as JitFramed, but for ngen", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_NGenOnlyOneMethod, W("NGenOnlyOneMethod"), 0, "", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_NgenOrder, W("NgenOrder"), 0, "", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_partialNGenStress, W("partialNGenStress"), 0, "", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_ZapDoNothing, W("ZapDoNothing"), 0, "", CLRConfig::REGUTIL_default)
-CONFIG_DWORD_INFO_EX(INTERNAL_NgenForceFailureMask, W("NgenForceFailureMask"), -1, "Bitmask used to control which locations will check and raise the failure (defaults to bits: -1)", CLRConfig::REGUTIL_default)
+CONFIG_DWORD_INFO_EX(INTERNAL_NgenForceFailureMask, W("NgenForceFailureMask"), (DWORD)-1, "Bitmask used to control which locations will check and raise the failure (defaults to bits: -1)", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_NgenForceFailureCount, W("NgenForceFailureCount"), 0, "If set to >0 and we have IBC data we will force a failure after we reference an IBC data item <value> times", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_NgenForceFailureKind, W("NgenForceFailureKind"), 1, "If set to 1, We will throw a TypeLoad exception; If set to 2, We will cause an A/V", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_NGenEnableCreatePdb, W("NGenEnableCreatePdb"), 0, "If set to >0 ngen.exe displays help on, recognizes createpdb in the command line")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_NGenSimulateDiskFull, W("NGenSimulateDiskFull"), 0, "If set to 1, ngen will throw a Disk full exception in ZapWriter.cpp:Save()")
-RETAIL_CONFIG_DWORD_INFO(INTERNAL_PartialNGen, W("PartialNGen"), -1, "Generate partial NGen images")
+RETAIL_CONFIG_DWORD_INFO(INTERNAL_PartialNGen, W("PartialNGen"), (DWORD)-1, "Generate partial NGen images")
CONFIG_DWORD_INFO(INTERNAL_NoASLRForNgen, W("NoASLRForNgen"), 0, "Turn off IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE bit in generated ngen images. Makes nidump output repeatable from run to run.")
diff --git a/src/utilcode/util.cpp b/src/utilcode/util.cpp
index d0a6035318..5acb57914f 100644
--- a/src/utilcode/util.cpp
+++ b/src/utilcode/util.cpp
@@ -1208,7 +1208,7 @@ int GetCurrentProcessCpuCount()
if (cCPUs != 0)
return cCPUs;
- int count = 0;
+ unsigned int count = 0;
DWORD_PTR pmask, smask;
if (!GetProcessAffinityMask(GetCurrentProcess(), &pmask, &smask))
diff --git a/src/vm/amd64/profiler.cpp b/src/vm/amd64/profiler.cpp
index d43df944d6..7dc1780c67 100644
--- a/src/vm/amd64/profiler.cpp
+++ b/src/vm/amd64/profiler.cpp
@@ -248,7 +248,7 @@ LPVOID ProfileArgIterator::GetNextArgAddr()
}
// if we're here we have an enregistered argument
- int regStructOfs = (argOffset - TransitionBlock::GetOffsetOfArgumentRegisters());
+ unsigned int regStructOfs = (argOffset - TransitionBlock::GetOffsetOfArgumentRegisters());
_ASSERTE(regStructOfs < ARGUMENTREGISTERS_SIZE);
CorElementType t = m_argIterator.GetArgType();
diff --git a/src/vm/argdestination.h b/src/vm/argdestination.h
index 439761bec2..386ba57c82 100644
--- a/src/vm/argdestination.h
+++ b/src/vm/argdestination.h
@@ -126,7 +126,7 @@ public:
// This function is used rarely and so the overhead of reading the zeros from
// the stack is negligible.
long long zeros[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS] = {};
- _ASSERTE(sizeof(zeros) >= fieldBytes);
+ _ASSERTE(sizeof(zeros) >= (size_t)fieldBytes);
CopyStructToRegisters(zeros, fieldBytes, 0);
}
diff --git a/src/vm/callhelpers.cpp b/src/vm/callhelpers.cpp
index e194161182..5124560128 100644
--- a/src/vm/callhelpers.cpp
+++ b/src/vm/callhelpers.cpp
@@ -408,7 +408,7 @@ void MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments, ARG_SLOT *
TypeHandle thReturnValueType;
if (m_methodSig.GetReturnTypeNormalized(&thReturnValueType) == ELEMENT_TYPE_VALUETYPE)
{
- _ASSERTE(cbReturnValue >= thReturnValueType.GetSize());
+ _ASSERTE((DWORD)cbReturnValue >= thReturnValueType.GetSize());
}
}
#endif // UNIX_AMD64_ABI
@@ -611,7 +611,7 @@ void MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments, ARG_SLOT *
if (pReturnValue != NULL)
{
- _ASSERTE(cbReturnValue <= sizeof(callDescrData.returnValue));
+ _ASSERTE((DWORD)cbReturnValue <= sizeof(callDescrData.returnValue));
memcpyNoGCRefs(pReturnValue, &callDescrData.returnValue, cbReturnValue);
#if !defined(_WIN64) && BIGENDIAN
diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp
index cd46cffaaa..c0fad3c595 100644
--- a/src/vm/ceeload.cpp
+++ b/src/vm/ceeload.cpp
@@ -1987,8 +1987,8 @@ void Module::BuildStaticsOffsets(AllocMemTracker *pamTracker)
#endif
DWORD dwNonGCBytes[2] = {
- DomainLocalModule::OffsetOfDataBlob() + sizeof(BYTE)*dwNumTypes,
- ThreadLocalModule::OffsetOfDataBlob() + sizeof(BYTE)*dwNumTypes
+ DomainLocalModule::OffsetOfDataBlob() + (DWORD)(sizeof(BYTE)*dwNumTypes),
+ ThreadLocalModule::OffsetOfDataBlob() + (DWORD)(sizeof(BYTE)*dwNumTypes)
};
HENUMInternalHolder hTypeEnum(pImport);
diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp
index 97b6a38366..4188658cca 100644
--- a/src/vm/codeman.cpp
+++ b/src/vm/codeman.cpp
@@ -302,8 +302,8 @@ void UnwindInfoTable::AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, PT_R
// We could imagine being much more efficient for 'bulk' updates, but we don't try
// because we assume that this is rare and we want to keep the code simple
- int usedSpace = unwindInfo->cTableCurCount - unwindInfo->cDeletedEntries;
- int desiredSpace = usedSpace * 5 / 4 + 1; // Increase by 20%
+ ULONG usedSpace = unwindInfo->cTableCurCount - unwindInfo->cDeletedEntries;
+ ULONG desiredSpace = usedSpace * 5 / 4 + 1; // Increase by 20%
// Be more aggresive if we used all of our space;
if (usedSpace == unwindInfo->cTableMaxCount)
desiredSpace = usedSpace * 3 / 2 + 1; // Increase by 50%
diff --git a/src/vm/codeversion.cpp b/src/vm/codeversion.cpp
index 5286815845..e5e8a75e80 100644
--- a/src/vm/codeversion.cpp
+++ b/src/vm/codeversion.cpp
@@ -47,7 +47,7 @@ bool NativeCodeVersion::operator!=(const NativeCodeVersion & rhs) const { return
// it is a bug. Corerror.xml has a comment in it reserving this value for our use but it doesn't
// appear in the public headers.
-#define CORPROF_E_RUNTIME_SUSPEND_REQUIRED 0x80131381
+#define CORPROF_E_RUNTIME_SUSPEND_REQUIRED _HRESULT_TYPEDEF_(0x80131381L)
#ifndef DACCESS_COMPILE
NativeCodeVersionNode::NativeCodeVersionNode(
@@ -1308,7 +1308,7 @@ HRESULT MethodDescVersioningState::JumpStampNativeCode(PCODE pCode /* = NULL */)
// revert.
if (GetJumpStampState() == JumpStampNone)
{
- for (int i = 0; i < sizeof(m_rgSavedCode); i++)
+ for (unsigned int i = 0; i < sizeof(m_rgSavedCode); i++)
{
m_rgSavedCode[i] = *FirstCodeByteAddr(pbCode + i, DebuggerController::GetPatchTable()->GetPatch((CORDB_ADDRESS_TYPE *)(pbCode + i)));
}
@@ -1413,7 +1413,7 @@ HRESULT MethodDescVersioningState::UpdateJumpTarget(BOOL fEESuspended, PCODE pRe
// revert.
if (GetJumpStampState() == JumpStampNone)
{
- for (int i = 0; i < sizeof(m_rgSavedCode); i++)
+ for (unsigned int i = 0; i < sizeof(m_rgSavedCode); i++)
{
m_rgSavedCode[i] = *FirstCodeByteAddr(pbCode + i, DebuggerController::GetPatchTable()->GetPatch((CORDB_ADDRESS_TYPE *)(pbCode + i)));
}
@@ -1640,7 +1640,7 @@ HRESULT MethodDescVersioningState::UpdateJumpStampHelper(BYTE* pbCode, INT64 i64
// PERF: we might still want a faster path through here if we aren't debugging that doesn't do
// all the patch checks
- for (int i = 0; i < MethodDescVersioningState::JumpStubSize; i++)
+ for (unsigned int i = 0; i < MethodDescVersioningState::JumpStubSize; i++)
{
*FirstCodeByteAddr(pbCode + i, DebuggerController::GetPatchTable()->GetPatch(pbCode + i)) = ((BYTE*)&i64NewValue)[i];
}
diff --git a/src/vm/codeversion.h b/src/vm/codeversion.h
index f29f67e3b7..dee4ac312a 100644
--- a/src/vm/codeversion.h
+++ b/src/vm/codeversion.h
@@ -33,7 +33,7 @@ typedef DPTR(class CodeVersionManager) PTR_CodeVersionManager;
// This HRESULT is only used as a private implementation detail. Corerror.xml has a comment in it
// reserving this value for our use but it doesn't appear in the public headers.
-#define CORPROF_E_RUNTIME_SUSPEND_REQUIRED 0x80131381
+#define CORPROF_E_RUNTIME_SUSPEND_REQUIRED _HRESULT_TYPEDEF_(0x80131381L)
#endif
diff --git a/src/vm/comdelegate.cpp b/src/vm/comdelegate.cpp
index e2660a2458..42f457ff3a 100644
--- a/src/vm/comdelegate.cpp
+++ b/src/vm/comdelegate.cpp
@@ -479,7 +479,7 @@ VOID GenerateShuffleArray(MethodDesc* pInvoke, MethodDesc *pTargetMeth, SArray<S
{
filledSlots[i] = false;
}
- for (int i = 0; i < pShuffleEntryArray->GetCount(); i++)
+ for (unsigned int i = 0; i < pShuffleEntryArray->GetCount(); i++)
{
entry = (*pShuffleEntryArray)[i];
@@ -487,7 +487,7 @@ VOID GenerateShuffleArray(MethodDesc* pInvoke, MethodDesc *pTargetMeth, SArray<S
// of the entry that filled it in.
if (filledSlots[GetNormalizedArgumentSlotIndex(entry.srcofs)])
{
- int j;
+ unsigned int j;
for (j = i; (*pShuffleEntryArray)[j].dstofs != entry.srcofs; j--)
(*pShuffleEntryArray)[j] = (*pShuffleEntryArray)[j - 1];
diff --git a/src/vm/dllimport.cpp b/src/vm/dllimport.cpp
index 7dedce6f9d..6fb16c51f6 100644
--- a/src/vm/dllimport.cpp
+++ b/src/vm/dllimport.cpp
@@ -867,13 +867,13 @@ public:
// </NOTE>
#if defined(PROFILING_SUPPORTED)
- DWORD dwMethodDescLocalNum = -1;
+ DWORD dwMethodDescLocalNum = (DWORD)-1;
// Notify the profiler of call out of the runtime
if (!SF_IsReverseCOMStub(m_dwStubFlags) && (CORProfilerTrackTransitions() || SF_IsNGENedStubForProfiling(m_dwStubFlags)))
{
dwMethodDescLocalNum = m_slIL.EmitProfilerBeginTransitionCallback(pcsDispatch, m_dwStubFlags);
- _ASSERTE(dwMethodDescLocalNum != -1);
+ _ASSERTE(dwMethodDescLocalNum != (DWORD)-1);
}
#endif // PROFILING_SUPPORTED
@@ -930,7 +930,7 @@ public:
#if defined(PROFILING_SUPPORTED)
// Notify the profiler of return back into the runtime
- if (dwMethodDescLocalNum != -1)
+ if (dwMethodDescLocalNum != (DWORD)-1)
{
m_slIL.EmitProfilerEndTransitionCallback(pcsDispatch, m_dwStubFlags, dwMethodDescLocalNum);
}
diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp
index c5b78c26a4..838450bb0b 100644
--- a/src/vm/exceptionhandling.cpp
+++ b/src/vm/exceptionhandling.cpp
@@ -901,7 +901,7 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord
{
DWORD exceptionCode = pExceptionRecord->ExceptionCode;
- if (exceptionCode == STATUS_UNWIND)
+ if ((NTSTATUS)exceptionCode == STATUS_UNWIND)
// If exceptionCode is STATUS_UNWIND, RtlUnwind is called with a NULL ExceptionRecord,
// therefore OS uses a faked ExceptionRecord with STATUS_UNWIND code. Then we need to
// look at our saved exception code.
diff --git a/src/vm/genericdict.cpp b/src/vm/genericdict.cpp
index 22453c71ef..687ae2fbb0 100644
--- a/src/vm/genericdict.cpp
+++ b/src/vm/genericdict.cpp
@@ -1233,7 +1233,7 @@ Dictionary::PopulateEntry(
ULONG slotIndex;
if (isReadyToRunModule)
{
- _ASSERT(dictionaryIndexAndSlot != -1);
+ _ASSERT(dictionaryIndexAndSlot != (DWORD)-1);
slotIndex = (ULONG)(dictionaryIndexAndSlot & 0xFFFF);
}
else
diff --git a/src/vm/i386/stublinkerx86.cpp b/src/vm/i386/stublinkerx86.cpp
index 9902419c97..c1fbd4db87 100644
--- a/src/vm/i386/stublinkerx86.cpp
+++ b/src/vm/i386/stublinkerx86.cpp
@@ -1414,7 +1414,7 @@ VOID StubLinkerCPU::X86EmitSPIndexPush(__int32 ofs)
// The offset can be expressed in a byte (can use the byte
// form of the push esp instruction)
- BYTE code[] = {0xff, 0x74, 0x24, ofs8};
+ BYTE code[] = {0xff, 0x74, 0x24, (BYTE)ofs8};
EmitBytes(code, sizeof(code));
}
else
diff --git a/src/vm/jithelpers.cpp b/src/vm/jithelpers.cpp
index 04de717cce..303f06130f 100644
--- a/src/vm/jithelpers.cpp
+++ b/src/vm/jithelpers.cpp
@@ -3834,7 +3834,7 @@ CORINFO_GENERIC_HANDLE JIT_GenericHandleWorker(MethodDesc * pMD, MethodTable * p
{
#ifdef _DEBUG
// Only in R2R mode are the module, dictionary index and dictionary slot provided as an input
- _ASSERTE(dictionaryIndexAndSlot != -1);
+ _ASSERTE(dictionaryIndexAndSlot != (DWORD)-1);
_ASSERT(ExecutionManager::FindReadyToRunModule(dac_cast<TADDR>(signature)) == pModule);
#endif
dictionaryIndex = (dictionaryIndexAndSlot >> 16);
@@ -3853,7 +3853,7 @@ CORINFO_GENERIC_HANDLE JIT_GenericHandleWorker(MethodDesc * pMD, MethodTable * p
// prepare for every possible derived type of the type containing the method). So instead we have to locate the exactly
// instantiated (non-shared) super-type of the class passed in.
- _ASSERTE(dictionaryIndexAndSlot == -1);
+ _ASSERTE(dictionaryIndexAndSlot == (DWORD)-1);
IfFailThrow(ptr.GetData(&dictionaryIndex));
}
diff --git a/src/vm/jithost.cpp b/src/vm/jithost.cpp
index 4a7783ef64..a037af4857 100644
--- a/src/vm/jithost.cpp
+++ b/src/vm/jithost.cpp
@@ -27,7 +27,7 @@ int JitHost::getIntConfigValue(const wchar_t* name, int defaultValue)
WRAPPER_NO_CONTRACT;
// Translate JIT call into runtime configuration query
- CLRConfig::ConfigDWORDInfo info{ name, defaultValue, CLRConfig::EEConfig_default };
+ CLRConfig::ConfigDWORDInfo info{ name, (DWORD)defaultValue, CLRConfig::EEConfig_default };
// Perform a CLRConfig look up on behalf of the JIT.
return CLRConfig::GetConfigValue(info);
diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp
index 42975b6537..6e4b288d66 100644
--- a/src/vm/jitinterface.cpp
+++ b/src/vm/jitinterface.cpp
@@ -7040,7 +7040,7 @@ bool getILIntrinsicImplementation(MethodDesc * ftn,
// Call CompareTo method on the primitive type
int tokCompareTo = pCompareToMD->GetMemberDef();
- int index = (et - ELEMENT_TYPE_I1);
+ unsigned int index = (et - ELEMENT_TYPE_I1);
_ASSERTE(index < _countof(ilcode));
ilcode[index][0] = CEE_LDARGA_S;
diff --git a/src/vm/managedmdimport.cpp b/src/vm/managedmdimport.cpp
index e709575257..5b8a3d5ae8 100644
--- a/src/vm/managedmdimport.cpp
+++ b/src/vm/managedmdimport.cpp
@@ -20,7 +20,7 @@ void ThrowMetaDataImportException(HRESULT hr)
MethodDescCallSite throwError(METHOD__METADATA_IMPORT__THROW_ERROR);
- ARG_SLOT args[] = { hr };
+ ARG_SLOT args[] = { (ARG_SLOT)hr };
throwError.Call(args);
}
diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp
index d0045411db..568a23136e 100644
--- a/src/vm/methodtablebuilder.cpp
+++ b/src/vm/methodtablebuilder.cpp
@@ -6326,7 +6326,7 @@ MethodTableBuilder::WriteMethodImplData(
// binary search later
for (DWORD i = 0; i < cSlots; i++)
{
- int min = i;
+ unsigned int min = i;
for (DWORD j = i + 1; j < cSlots; j++)
{
if (rgSlots[j] < rgSlots[min])
diff --git a/src/vm/readytoruninfo.cpp b/src/vm/readytoruninfo.cpp
index 378ce2a3f2..c855fd1fa9 100644
--- a/src/vm/readytoruninfo.cpp
+++ b/src/vm/readytoruninfo.cpp
@@ -685,7 +685,7 @@ PCODE ReadyToRunInfo::GetEntryPoint(MethodDesc * pMD, PrepareCodeConfig* pConfig
NativeHashtable::Enumerator lookup = m_instMethodEntryPoints.Lookup(GetVersionResilientMethodHashCode(pMD));
NativeParser entryParser;
- offset = -1;
+ offset = (uint)-1;
while (lookup.GetNext(entryParser))
{
PCCOR_SIGNATURE pBlob = (PCCOR_SIGNATURE)entryParser.GetBlob();
@@ -702,7 +702,7 @@ PCODE ReadyToRunInfo::GetEntryPoint(MethodDesc * pMD, PrepareCodeConfig* pConfig
}
}
- if (offset == -1)
+ if (offset == (uint)-1)
return NULL;
}
else
diff --git a/src/vm/rejit.cpp b/src/vm/rejit.cpp
index d0742840d4..9735df011f 100644
--- a/src/vm/rejit.cpp
+++ b/src/vm/rejit.cpp
@@ -165,7 +165,7 @@
// This HRESULT is only used as a private implementation detail. Corerror.xml has a comment in it
// reserving this value for our use but it doesn't appear in the public headers.
-#define CORPROF_E_RUNTIME_SUSPEND_REQUIRED 0x80131381
+#define CORPROF_E_RUNTIME_SUSPEND_REQUIRED _HRESULT_TYPEDEF_(0x80131381L)
// This is just used as a unique id. Overflow is OK. If we happen to have more than 4+Billion rejits
// and somehow manage to not run out of memory, we'll just have to redefine ReJITID as size_t.
diff --git a/src/vm/rexcep.h b/src/vm/rexcep.h
index 054d6ed4e6..c50608f6e7 100644
--- a/src/vm/rexcep.h
+++ b/src/vm/rexcep.h
@@ -201,7 +201,7 @@ DEFINE_EXCEPTION(g_IONS, FileNotFoundException, true,
DEFINE_EXCEPTION(g_SystemNS, FormatException, false, COR_E_FORMAT)
-DEFINE_EXCEPTION(g_SystemNS, IndexOutOfRangeException, false, COR_E_INDEXOUTOFRANGE, 0x800a0009 /*Subscript out of range*/)
+DEFINE_EXCEPTION(g_SystemNS, IndexOutOfRangeException, false, COR_E_INDEXOUTOFRANGE, (int)0x800a0009 /*Subscript out of range*/)
DEFINE_EXCEPTION(g_SystemNS, InsufficientExecutionStackException, false, COR_E_INSUFFICIENTEXECUTIONSTACK)
DEFINE_EXCEPTION(g_SystemNS, InvalidCastException, false, COR_E_INVALIDCAST)
#ifdef FEATURE_COMINTEROP
diff --git a/src/vm/util.cpp b/src/vm/util.cpp
index f03c5e3605..8765896c4a 100644
--- a/src/vm/util.cpp
+++ b/src/vm/util.cpp
@@ -2929,7 +2929,7 @@ void DACNotify::DoGCNotification(const GcEvtArgs& args)
if (args.typ == GC_MARK_END)
{
- TADDR Args[3] = { GC_NOTIFICATION, (TADDR) args.typ, args.condemnedGeneration };
+ TADDR Args[3] = { GC_NOTIFICATION, (TADDR) args.typ, (TADDR) args.condemnedGeneration };
DACNotifyExceptionHelper(Args, 3);
}
}
diff --git a/src/vm/yieldprocessornormalized.cpp b/src/vm/yieldprocessornormalized.cpp
index 79d983e6dd..33fe113414 100644
--- a/src/vm/yieldprocessornormalized.cpp
+++ b/src/vm/yieldprocessornormalized.cpp
@@ -72,7 +72,7 @@ static void InitializeYieldProcessorNormalized()
{
yieldsPerNormalizedYield = 1;
}
- _ASSERTE(yieldsPerNormalizedYield <= MinNsPerNormalizedYield);
+ _ASSERTE(yieldsPerNormalizedYield <= (int)MinNsPerNormalizedYield);
// Calculate the maximum number of yields that would be optimal for a late spin iteration. Typically, we would not want to
// spend excessive amounts of time (thousands of cycles) doing only YieldProcessor, as SwitchToThread/Sleep would do a
diff --git a/src/zap/zapcode.cpp b/src/zap/zapcode.cpp
index 1c3cd83294..91cf7163e6 100644
--- a/src/zap/zapcode.cpp
+++ b/src/zap/zapcode.cpp
@@ -1788,7 +1788,7 @@ DWORD ZapLazyHelperThunk::SaveWorker(ZapWriter * pZapWriter)
PORTABILITY_ASSERT("ZapLazyHelperThunk::Save");
#endif
- _ASSERTE(p - buffer <= sizeof(buffer));
+ _ASSERTE((DWORD)(p - buffer) <= sizeof(buffer));
if (pZapWriter != NULL)
pZapWriter->Write(&buffer, (int)(p - buffer));
diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp
index 7a849fbfcc..59a9e12a8b 100644
--- a/src/zap/zapimage.cpp
+++ b/src/zap/zapimage.cpp
@@ -2177,7 +2177,7 @@ ZapImage::CompileStatus ZapImage::TryCompileMethodWorker(CORINFO_METHOD_HANDLE h
// We skip the compilation of such methods and we don't want to
// issue a warning or error
//
- if ((hrException == E_NOTIMPL) || (hrException == IDS_CLASSLOAD_GENERAL))
+ if ((hrException == E_NOTIMPL) || (hrException == (HRESULT)IDS_CLASSLOAD_GENERAL))
{
result = NOT_COMPILED;
level = CORZAP_LOGLEVEL_INFO;
diff --git a/src/zap/zapimport.cpp b/src/zap/zapimport.cpp
index 887996475c..d84ea79e8a 100644
--- a/src/zap/zapimport.cpp
+++ b/src/zap/zapimport.cpp
@@ -2205,7 +2205,7 @@ DWORD ZapIndirectHelperThunk::SaveWorker(ZapWriter * pZapWriter)
PORTABILITY_ASSERT("ZapIndirectHelperThunk::SaveWorker");
#endif
- _ASSERTE(p - buffer <= sizeof(buffer));
+ _ASSERTE((DWORD)(p - buffer) <= sizeof(buffer));
if (pZapWriter != NULL)
pZapWriter->Write(&buffer, (int)(p - buffer));
diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp
index ccb796da9c..560400bd44 100644
--- a/src/zap/zapinfo.cpp
+++ b/src/zap/zapinfo.cpp
@@ -549,7 +549,7 @@ class MethodCodeComparer
if (k1 == k2)
return TRUE;
- for (int i = 0; i < _countof(equivalentNodes); i++)
+ for (unsigned int i = 0; i < _countof(equivalentNodes); i++)
{
if (k1 == equivalentNodes[i][0] && k2 == equivalentNodes[i][1])
return TRUE;