conversion
authorSinan Kaya <sinan.kaya@microsoft.com>
Thu, 7 Mar 2019 01:46:07 +0000 (01:46 +0000)
committerSinan Kaya <sinan.kaya@microsoft.com>
Thu, 7 Mar 2019 04:41:35 +0000 (04:41 +0000)
Commit migrated from https://github.com/dotnet/coreclr/commit/b1f7195e26d8e0eb310515fe44d02883375c9ec3

src/coreclr/src/inc/clrconfigvalues.h
src/coreclr/src/vm/ceeload.cpp
src/coreclr/src/vm/i386/stublinkerx86.cpp
src/coreclr/src/vm/jithost.cpp
src/coreclr/src/vm/managedmdimport.cpp
src/coreclr/src/vm/rexcep.h
src/coreclr/src/vm/util.cpp

index 201a123..a8b4270 100644 (file)
@@ -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.")
 
index cd46cff..c0fad3c 100644 (file)
@@ -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);
index 9902419..742e2fc 100644 (file)
@@ -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 & 0xFF)};
         EmitBytes(code, sizeof(code));   
     }
     else
index 4a7783e..ff31041 100644 (file)
@@ -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, static_cast<DWORD>(defaultValue), CLRConfig::EEConfig_default };
 
     // Perform a CLRConfig look up on behalf of the JIT.
     return CLRConfig::GetConfigValue(info);
index e709575..5b8a3d5 100644 (file)
@@ -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);
 }
 
index 054d6ed..c50608f 100644 (file)
@@ -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
index f03c5e3..8765896 100644 (file)
@@ -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);
     }
 }