summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ToolBox/SOS/Strike/ExpressionNode.cpp3
-rw-r--r--src/ToolBox/SOS/Strike/disasm.cpp2
-rw-r--r--src/ToolBox/SOS/Strike/strike.cpp8
-rw-r--r--src/classlibnative/bcltype/arraynative.cpp4
-rw-r--r--src/debug/daccess/daccess.cpp5
-rw-r--r--src/debug/daccess/fntableaccess.cpp3
-rw-r--r--src/debug/di/module.cpp1
-rw-r--r--src/debug/ee/debugger.cpp2
-rw-r--r--src/gcinfo/gcinfoencoder.cpp2
-rw-r--r--src/ildasm/dasm.cpp7
-rw-r--r--src/ildasm/dis.cpp2
-rw-r--r--src/inc/warningcontrol.h16
-rw-r--r--src/jit/compiler.cpp3
-rw-r--r--src/jit/gentree.cpp3
-rw-r--r--src/md/compiler/disp.cpp4
-rw-r--r--src/md/compiler/regmeta_vm.cpp1
-rw-r--r--src/md/winmd/adapter.cpp1
-rw-r--r--src/strongname/api/strongname.cpp1
-rw-r--r--src/unwinder/amd64/unwinder_amd64.cpp3
-rw-r--r--src/unwinder/arm64/unwinder_arm64.cpp2
-rw-r--r--src/utilcode/ccomprc.cpp1
-rw-r--r--src/utilcode/longfilepathwrappers.cpp3
-rw-r--r--src/utilcode/securityutil.cpp2
-rw-r--r--src/utilcode/stacktrace.cpp1
-rw-r--r--src/utilcode/stresslog.cpp1
-rw-r--r--src/utilcode/utilmessagebox.cpp1
-rw-r--r--src/vm/assemblynative.cpp1
-rw-r--r--src/vm/ceeload.cpp1
-rw-r--r--src/vm/classcompat.cpp1
-rw-r--r--src/vm/clrtocomcall.cpp1
-rw-r--r--src/vm/comsynchronizable.cpp1
-rw-r--r--src/vm/comtoclrcall.cpp4
-rw-r--r--src/vm/gcenv.ee.common.cpp1
-rw-r--r--src/vm/gcheaputilities.cpp1
-rw-r--r--src/vm/interoputil.cpp2
-rw-r--r--src/vm/jitinterface.cpp13
-rw-r--r--src/vm/methodtablebuilder.cpp1
-rw-r--r--src/vm/multicorejitplayer.cpp2
-rw-r--r--src/vm/olevariant.cpp1
-rw-r--r--src/vm/readytoruninfo.cpp1
-rw-r--r--src/vm/runtimecallablewrapper.cpp1
-rw-r--r--src/zap/zapinfo.cpp2
-rw-r--r--src/zap/zapreadytorun.cpp3
43 files changed, 21 insertions, 98 deletions
diff --git a/src/ToolBox/SOS/Strike/ExpressionNode.cpp b/src/ToolBox/SOS/Strike/ExpressionNode.cpp
index 03630b40a6..b61dcad487 100644
--- a/src/ToolBox/SOS/Strike/ExpressionNode.cpp
+++ b/src/ToolBox/SOS/Strike/ExpressionNode.cpp
@@ -577,7 +577,6 @@ HRESULT ExpressionNode::ExpandFields(ICorDebugValue* pInnerValue, __in_z WCHAR*
ULONG nameLen = 0;
DWORD fieldAttr = 0;
WCHAR mdName[mdNameLen];
- WCHAR typeName[mdNameLen];
CorElementType fieldDefaultValueEt;
UVCP_CONSTANT pDefaultValue;
ULONG cchDefaultValue;
@@ -771,7 +770,6 @@ HRESULT ExpressionNode::PopulateEnumValue(ICorDebugValue* pEnumValue, BYTE* enum
ULONG nameLen = 0;
DWORD fieldAttr = 0;
WCHAR mdName[mdNameLen];
- WCHAR typeName[mdNameLen];
UVCP_CONSTANT pRawValue = NULL;
ULONG rawValueLength = 0;
if(SUCCEEDED(pMD->GetFieldProps(fieldDef, NULL, mdName, mdNameLen, &nameLen, &fieldAttr, NULL, NULL, NULL, &pRawValue, &rawValueLength)))
@@ -1478,7 +1476,6 @@ HRESULT ExpressionNode::CreateExpressionNodeHelper(__in_z WCHAR* pExpression,
ULONG nameLen = 0;
DWORD fieldAttr = 0;
WCHAR mdName[mdNameLen];
- WCHAR typeName[mdNameLen];
CorElementType fieldDefaultValueEt;
UVCP_CONSTANT pDefaultValue;
ULONG cchDefaultValue;
diff --git a/src/ToolBox/SOS/Strike/disasm.cpp b/src/ToolBox/SOS/Strike/disasm.cpp
index 6137031410..f82c38ac4d 100644
--- a/src/ToolBox/SOS/Strike/disasm.cpp
+++ b/src/ToolBox/SOS/Strike/disasm.cpp
@@ -873,8 +873,6 @@ void PrintNativeStack(DWORD_PTR ip, BOOL bSuppressLines)
// Return TRUE if we have printed something.
BOOL PrintCallInfo(DWORD_PTR vEBP, DWORD_PTR IP, DumpStackFlag& DSFlag, BOOL bSymbolOnly)
{
- char Symbol[1024];
- char filename[MAX_PATH_FNAME+1];
ULONG64 Displacement;
BOOL bOutput = FALSE;
diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
index b566ed5711..cd3b9f299c 100644
--- a/src/ToolBox/SOS/Strike/strike.cpp
+++ b/src/ToolBox/SOS/Strike/strike.cpp
@@ -7300,10 +7300,9 @@ HRESULT HandleExceptionNotification(ILLDBServices *client)
DECLARE_API(bpmd)
{
- INIT_API_NOEE();
- MINIDUMP_NOT_SUPPORTED();
- int i;
- char buffer[1024];
+ INIT_API_NOEE();
+ MINIDUMP_NOT_SUPPORTED();
+ char buffer[1024];
if (IsDumpFile())
{
@@ -11459,7 +11458,6 @@ private:
ULONG nameLen = 0;
DWORD fieldAttr = 0;
WCHAR mdName[mdNameLen];
- WCHAR typeName[mdNameLen];
UVCP_CONSTANT pRawValue = NULL;
ULONG rawValueLength = 0;
if(SUCCEEDED(pMD->GetFieldProps(fieldDef, NULL, mdName, mdNameLen, &nameLen, &fieldAttr, NULL, NULL, NULL, &pRawValue, &rawValueLength)))
diff --git a/src/classlibnative/bcltype/arraynative.cpp b/src/classlibnative/bcltype/arraynative.cpp
index d05f0ca1fb..a40aed5619 100644
--- a/src/classlibnative/bcltype/arraynative.cpp
+++ b/src/classlibnative/bcltype/arraynative.cpp
@@ -936,10 +936,6 @@ void ArrayNative::ArrayCopyNoTypeCheck(BASEARRAYREF pSrc, unsigned int srcIndex,
FCIMPL6(void, ArrayNative::ArrayCopy, ArrayBase* m_pSrc, INT32 m_iSrcIndex, ArrayBase* m_pDst, INT32 m_iDstIndex, INT32 m_iLength, CLR_BOOL reliable)
{
FCALL_CONTRACT;
-
- BYTE *src;
- BYTE *dst;
- SIZE_T size;
struct _gc
{
diff --git a/src/debug/daccess/daccess.cpp b/src/debug/daccess/daccess.cpp
index 5bfbf6151e..1ce452bc2d 100644
--- a/src/debug/daccess/daccess.cpp
+++ b/src/debug/daccess/daccess.cpp
@@ -2817,7 +2817,6 @@ public:
{
StreamHeader hdr;
- DWORD _sig;
in >> hdr; // in >> hdr.sig >> hdr.cnt;
if (hdr.sig != sig)
@@ -7269,9 +7268,6 @@ ClrDataAccess::GetDacGlobals()
LPVOID rsrcData = NULL;
DWORD rsrcSize = 0;
- HRSRC rsrcFound;
- HGLOBAL rsrc;
-
DWORD resourceSectionRVA = 0;
if (FAILED(status = GetMachineAndResourceSectionRVA(m_pTarget, m_globalBase, NULL, &resourceSectionRVA)))
@@ -7392,7 +7388,6 @@ BOOL ClrDataAccess::IsExceptionFromManagedCode(EXCEPTION_RECORD* pExceptionRecor
{
DAC_ENTER();
- HRESULT status;
BOOL flag = FALSE;
if (::IsExceptionFromManagedCode(pExceptionRecord))
diff --git a/src/debug/daccess/fntableaccess.cpp b/src/debug/daccess/fntableaccess.cpp
index 6dcd5844e4..5ce5bbf284 100644
--- a/src/debug/daccess/fntableaccess.cpp
+++ b/src/debug/daccess/fntableaccess.cpp
@@ -179,7 +179,6 @@ static NTSTATUS OutOfProcessFunctionTableCallback_JIT(IN ReadMemoryFunction
DWORD_PTR hdrOffsetInitial;
DWORD nEntries;
DWORD index;
- DWORD_PTR pUnwindInfo;
PT_RUNTIME_FUNCTION pFunctions;
LONG64 lSmallestOffset;
@@ -459,4 +458,4 @@ extern "C" NTSTATUS OutOfProcessFunctionTableCallbackEx()
}
#endif // !_TARGET_X86_
-#endif // !FEATURE_PAL \ No newline at end of file
+#endif // !FEATURE_PAL
diff --git a/src/debug/di/module.cpp b/src/debug/di/module.cpp
index 814f0019ce..5097008be0 100644
--- a/src/debug/di/module.cpp
+++ b/src/debug/di/module.cpp
@@ -4791,7 +4791,6 @@ int CordbNativeCode::GetCallInstructionLength(BYTE *ip, ULONG32 count)
return -1;
}
- BYTE *result;
WORD displace = -1;
// See: Tables A-15,16,17 in AMD Dev Manual 3 for information
diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp
index b63d19b44a..7629d17a1e 100644
--- a/src/debug/ee/debugger.cpp
+++ b/src/debug/ee/debugger.cpp
@@ -13032,8 +13032,6 @@ HRESULT Debugger::UpdateFunction(MethodDesc* pMD, SIZE_T encVersion)
// function, i.e., its already been jitted. Otherwise, the EE will
// pickup the new method on the next JIT anyway.
- ICorDebugInfo::SourceTypes src;
-
EnCSequencePointHelper sequencePointHelper(pJitInfo);
// For each offset in the IL->Native map, set a new EnC breakpoint on the
diff --git a/src/gcinfo/gcinfoencoder.cpp b/src/gcinfo/gcinfoencoder.cpp
index 9e07d1b69f..8b75166fd7 100644
--- a/src/gcinfo/gcinfoencoder.cpp
+++ b/src/gcinfo/gcinfoencoder.cpp
@@ -1791,7 +1791,7 @@ void GcInfoEncoder::Build()
}
}
}
- catch (GcInfoNoMemoryException& e)
+ catch (GcInfoNoMemoryException&)
{
outOfMemory = true;
}
diff --git a/src/ildasm/dasm.cpp b/src/ildasm/dasm.cpp
index ca64522d59..414ebba876 100644
--- a/src/ildasm/dasm.cpp
+++ b/src/ildasm/dasm.cpp
@@ -1054,7 +1054,6 @@ BOOL EnumTypedefs()
void DumpTypedefs(void* GUICookie)
{
- HRESULT hr;
DWORD i;
char* szptr;
CQuickBytes out;
@@ -1500,7 +1499,6 @@ mdToken ResolveReflectionNotation(BYTE* dataPtr,
unsigned UnderlyingTypeOfEnumTypeDef(mdToken tk, IMDInternalImport *pIMDI)
{
- HRESULT hr;
// make sure it's a TypeDef
if(TypeFromToken(tk) != mdtTypeDef) return 0;
@@ -2268,7 +2266,6 @@ BOOL PrettyPrintCustomAttributeNVPairs(unsigned nPairs, BYTE* dataPtr, BYTE* dat
}
BOOL PrettyPrintCustomAttributeBlob(mdToken tkType, BYTE* pBlob, ULONG ulLen, void* GUICookie, __inout __nullterminated char* szString)
{
- HRESULT hr;
char* initszptr = szString + strlen(szString);
PCCOR_SIGNATURE typePtr; // type to convert,
ULONG typeLen; // the lenght of 'typePtr'
@@ -2387,7 +2384,6 @@ BOOL PrettyPrintCustomAttributeBlob(mdToken tkType, BYTE* pBlob, ULONG ulLen, vo
void DumpCustomAttributeProps(mdToken tkCA, mdToken tkType, mdToken tkOwner, BYTE* pBlob, ULONG ulLen, void *GUICookie, bool bWithOwner)
{
- HRESULT hr;
char* szptr = &szString[0];
BOOL fCommentItOut = FALSE;
if((TypeFromToken(tkType) == mdtMemberRef)||(TypeFromToken(tkType) == mdtMethodDef))
@@ -3255,7 +3251,6 @@ void DumpGenericParsCA(mdToken tok, void* GUICookie/*=NULL*/)
void PrettyPrintOverrideDecl(ULONG i, __inout __nullterminated char* szString, void* GUICookie, mdToken tkOverrider,
BOOL *pbOverridingTypeSpec)
{
- HRESULT hr;
const char * pszMemberName;
mdToken tkDecl,tkDeclParent=0;
char szBadToken[256];
@@ -3363,7 +3358,6 @@ void PrettyPrintOverrideDecl(ULONG i, __inout __nullterminated char* szString, v
#endif
BOOL DumpMethod(mdToken FuncToken, const char *pszClassName, DWORD dwEntryPointToken,void *GUICookie,BOOL DumpBody)
{
- HRESULT hr;
const char *pszMemberName = NULL;//[MAX_MEMBER_LENGTH];
const char *pszMemberSig = NULL;
DWORD dwAttrs = 0;
@@ -6940,7 +6934,6 @@ void DumpPreamble()
void DumpSummary()
{
- HRESULT hr;
ULONG i;
const char *pcClass,*pcNS,*pcMember, *pcSig;
char szFQN[4096];
diff --git a/src/ildasm/dis.cpp b/src/ildasm/dis.cpp
index 2b3229e920..43f2190c27 100644
--- a/src/ildasm/dis.cpp
+++ b/src/ildasm/dis.cpp
@@ -870,7 +870,6 @@ BOOL SourceLinesHelper(void *GUICookie, LineCodeDescr* pLCD, __out_ecount(nSize)
#endif
BOOL Disassemble(IMDInternalImport *pImport, BYTE *ILHeader, void *GUICookie, mdToken FuncToken, ParamDescriptor* pszArgname, ULONG ulArgs)
{
- HRESULT hr;
DWORD PC;
BOOL fNeedNewLine = FALSE;
//char szString[4096];
@@ -2469,7 +2468,6 @@ void PrettyPrintToken(__inout __nullterminated char* szString, mdToken tk, IMDIn
case mdtFieldDef:
{
- HRESULT hr;
mdTypeRef cr=0;
const char * pszMemberName;
CQuickBytes qbMemberSig;
diff --git a/src/inc/warningcontrol.h b/src/inc/warningcontrol.h
index abc4831639..3bfb4e54c3 100644
--- a/src/inc/warningcontrol.h
+++ b/src/inc/warningcontrol.h
@@ -13,30 +13,18 @@
//
#if defined(_MSC_VER)
-#pragma warning(disable :4001) // "nonstandard extension 'single line comment' was used"
#pragma warning(error :4007) // 'main' : must be __cdecl
-#pragma warning(disable :4010) // "single-line comment contains line-continuation character"
#pragma warning(error :4013) // 'function' undefined - assuming extern returning int
-#pragma warning(disable :4022) // "'%s' : pointer mismatch for actual parameter %d"
-#pragma warning(disable :4047) // "'%$L' : '%$T' differs in levels of indirection from '%$T'"
-#pragma warning(disable :4053) // "one void operand for '?:'"
-#pragma warning(disable :4056) // "overflow in floating-point constant arithmetic"
-#pragma warning(disable :4061) // "enumerate '%$S' in switch of enum '%$S' is not explicitly handled by a case label"
#pragma warning(error :4071) // no function prototype given
#pragma warning(error :4072) // no function prototype given (fastcall)
#pragma warning(3 :4092) // sizeof returns 'unsigned long'
-#pragma warning(disable :4100) // "'%$S' : unreferenced formal parameter"
-#pragma warning(disable :4101) // "'%$S' : unreferenced local variable"
//#pragma warning(error :4102) // "'%$S' : unreferenced label"
#pragma warning(3 :4121) // structure is sensitive to alignment
-#pragma warning(disable :4127) // "conditional expression is constant"
#pragma warning(3 :4125) // decimal digit in octal sequence
#pragma warning(3 :4130) // logical operation on address of string constant
#pragma warning(3 :4132) // const object should be initialized
#pragma warning(error :4171) // no function prototype given (old style)
#pragma warning(4 :4177) // pragma data_seg s/b at global scope
-#pragma warning(disable :4201) // "nonstandard extension used : nameless struct/union"
-#pragma warning(disable :4204) // "nonstandard extension used : non-constant aggregate initializer"
#pragma warning(4 :4206) // Source File is empty
#pragma warning(3 :4212) // function declaration used ellipsis
#pragma warning(error :4259) // pure virtual function was not defined
@@ -45,7 +33,6 @@
#pragma warning(disable :4311) // pointer truncation from '%$S' to '%$S'
#pragma warning(disable :4312) // '<function-style-cast>' : conversion from '%$S' to '%$S' of greater size
#pragma warning(disable :4334) // result of 32-bit shift implicitly converted to 64 bits
-#pragma warning(disable :4345) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
#pragma warning(disable :4430) // missing type specifier: C++ doesn't support default-int
#pragma warning(disable :4477) // format string '%$S' requires an argument of type '%$S', but variadic argument %d has type '%$S'
#pragma warning(3 :4509) // "nonstandard extension used: '%$S' uses SEH and '%$S' has destructor"
@@ -68,10 +55,7 @@
#pragma warning(error :4551) // Function call missing argument list
#pragma warning(error :4700) // Local used w/o being initialized
-#pragma warning(disable :4706) // assignment within conditional expression
-#pragma warning(disable :4768) // __declspec attributes before linkage specification are ignored
#pragma warning(error :4806) // unsafe operation involving type 'bool'
-#pragma warning(disable :4995) // '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
#if defined(_DEBUG) && (!defined(_MSC_FULL_VER) || (_MSC_FULL_VER <= 181040116))
// The CLR header file check.h, macro CHECK_MSG_EX, can create unreachable code if the LEAVE_DEBUG_ONLY_CODE
diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp
index b1be7e74dd..6231da8fb3 100644
--- a/src/jit/compiler.cpp
+++ b/src/jit/compiler.cpp
@@ -3990,7 +3990,8 @@ void Compiler::compInitDebuggingInfo()
void Compiler::compSetOptimizationLevel()
{
- bool theMinOptsValue;
+ bool theMinOptsValue;
+#pragma warning(suppress : 4101)
unsigned jitMinOpts;
if (compIsForInlining())
diff --git a/src/jit/gentree.cpp b/src/jit/gentree.cpp
index bc3b56eb2c..93d9df1157 100644
--- a/src/jit/gentree.cpp
+++ b/src/jit/gentree.cpp
@@ -6256,8 +6256,7 @@ GenTreeCall* Compiler::gtNewCallNode(
}
// Make sure that there are no duplicate entries for a given call node
- IL_OFFSETX value;
- assert(!genCallSite2ILOffsetMap->Lookup(node, &value));
+ assert(!genCallSite2ILOffsetMap->Lookup(node));
genCallSite2ILOffsetMap->Set(node, ilOffset);
}
diff --git a/src/md/compiler/disp.cpp b/src/md/compiler/disp.cpp
index 15f5f11103..bf4f4104be 100644
--- a/src/md/compiler/disp.cpp
+++ b/src/md/compiler/disp.cpp
@@ -70,7 +70,6 @@ Disp::DefineScope(
HRESULT hr = S_OK;
PathString szFileName(PathString::Literal, W("file:"));
PathString szFileNameSuffix;
- DWORD len;
BEGIN_ENTRYPOINT_NOTHROW;
RegMeta *pMeta = 0;
@@ -99,7 +98,8 @@ Disp::DefineScope(
#ifdef ENC_DELTA_HACK
// Testers need this flag for their tests.
-
+
+ DWORD len;
EX_TRY{
len = WszGetEnvironmentVariable(W("COMP_ENC_OPENSCOPE"), szFileNameSuffix);
szFileName.Append(szFileNameSuffix);
diff --git a/src/md/compiler/regmeta_vm.cpp b/src/md/compiler/regmeta_vm.cpp
index 5948d2aa88..4b227add89 100644
--- a/src/md/compiler/regmeta_vm.cpp
+++ b/src/md/compiler/regmeta_vm.cpp
@@ -166,7 +166,6 @@ RegMeta::ResolveTypeRef(
TypeRefRec * pTypeRefRec;
WCHAR wzNameSpace[_MAX_PATH];
CMiniMdRW * pMiniMd = NULL;
- WCHAR rcModule[_MAX_PATH];
LOG((LOGMD, "{%08x} RegMeta::ResolveTypeRef(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
this, tr, riid, ppIScope, ptd));
diff --git a/src/md/winmd/adapter.cpp b/src/md/winmd/adapter.cpp
index d4e95b7f8b..11db22d283 100644
--- a/src/md/winmd/adapter.cpp
+++ b/src/md/winmd/adapter.cpp
@@ -1599,7 +1599,6 @@ HRESULT WinMDAdapter::ComputeMethodDefTreatment(mdMethodDef tkMethodDef, mdTypeD
mdToken tkMethodImplFirst;
ULONG count;
- mdTypeRef mtTypeRef;
IfFailGo(m_pRawMetaModelCommonRO->CommonGetMethodImpls(tkDeclaringTypeDef, &tkMethodImplFirst, &count));
for (ULONG i = 0; i < count; i++)
{
diff --git a/src/strongname/api/strongname.cpp b/src/strongname/api/strongname.cpp
index 09c438b213..4f69b3682f 100644
--- a/src/strongname/api/strongname.cpp
+++ b/src/strongname/api/strongname.cpp
@@ -281,7 +281,6 @@ SNAPI StrongNameTokenFromPublicKey(BYTE *pbPublicKeyBlob, // [in] publ
SHA1Hash sha1;
BYTE *pHash = NULL;
DWORD i;
- DWORD cbKeyBlob;
PublicKeyBlob *pPublicKey = NULL;
DWORD dwHashLenMinusTokenSize = 0;
diff --git a/src/unwinder/amd64/unwinder_amd64.cpp b/src/unwinder/amd64/unwinder_amd64.cpp
index c04db21dfd..65da7862a5 100644
--- a/src/unwinder/amd64/unwinder_amd64.cpp
+++ b/src/unwinder/amd64/unwinder_amd64.cpp
@@ -452,7 +452,6 @@ HRESULT.
ULONG OpInfo;
PULONG64 ReturnAddress;
PULONG64 StackAddress;
- NTSTATUS Status;
PUNWIND_INFO UnwindInfo;
UNWIND_CODE UnwindOp;
@@ -978,8 +977,6 @@ Return Value:
if ((UnwindInfo->Flags & UNW_FLAG_CHAININFO) != 0) {
- _PIMAGE_RUNTIME_FUNCTION_ENTRY ChainEntry;
-
Index = UnwindInfo->CountOfUnwindCodes;
if ((Index & 1) != 0) {
Index += 1;
diff --git a/src/unwinder/arm64/unwinder_arm64.cpp b/src/unwinder/arm64/unwinder_arm64.cpp
index c9f07eb4b7..4c63815ccd 100644
--- a/src/unwinder/arm64/unwinder_arm64.cpp
+++ b/src/unwinder/arm64/unwinder_arm64.cpp
@@ -658,7 +658,6 @@ Return Value:
ULONG FunctionLength;
ULONG HeaderWord;
ULONG NextCode;
- ULONG Offset;
DWORD64 OffsetInFunction;
ULONG ScopeNum;
ULONG ScopeSize;
@@ -1293,7 +1292,6 @@ Return Value:
ULONG HBit;
ULONG HOpcodes;
ULONG IRegOpcodes;
- ULONG InstCount;
ULONG IntSize;
ULONG LocalSize;
DWORD64 OffsetInFunction;
diff --git a/src/utilcode/ccomprc.cpp b/src/utilcode/ccomprc.cpp
index 205c3ff331..431b5d5dc3 100644
--- a/src/utilcode/ccomprc.cpp
+++ b/src/utilcode/ccomprc.cpp
@@ -920,7 +920,6 @@ HRESULT CCompRC::LoadLibraryHelper(HRESOURCEDLL *pHInst,
CONTRACTL_END;
HRESULT hr = E_FAIL;
- size_t rcPartialPathLen;
_ASSERTE(m_pResourceFile != NULL);
diff --git a/src/utilcode/longfilepathwrappers.cpp b/src/utilcode/longfilepathwrappers.cpp
index 2e493d02b5..edd0aee900 100644
--- a/src/utilcode/longfilepathwrappers.cpp
+++ b/src/utilcode/longfilepathwrappers.cpp
@@ -1219,7 +1219,6 @@ BOOL PAL_GetPALDirectoryWrapper(SString& pbuffer)
}
else
{
- DWORD dwLength;
hr = CopySystemDirectory(pPath, pbuffer);
}
@@ -1288,7 +1287,7 @@ BOOL LongFile::IsPathNotFullyQualified(SString & path)
return !IsDirectorySeparator(path[1]); // There is no valid way to specify a relative path with two initial slashes
}
- return !((path.GetCount() >= 3) //The only way to specify a fixed path that doesn't begin with two slashes is the drive, colon, slash format- i.e. C:\
+ return !((path.GetCount() >= 3) //The only way to specify a fixed path that doesn't begin with two slashes is the drive, colon, slash format- i.e. "C:\"
&& (path[1] == VolumeSeparatorChar)
&& IsDirectorySeparator(path[2]));
}
diff --git a/src/utilcode/securityutil.cpp b/src/utilcode/securityutil.cpp
index b5032aa9b4..b79d3ea705 100644
--- a/src/utilcode/securityutil.cpp
+++ b/src/utilcode/securityutil.cpp
@@ -409,8 +409,6 @@ HRESULT SecurityUtil::SetSecurityDescriptorMandatoryLabel(PSID psidIntegrityLeve
}
CONTRACTL_END;
- HRESULT hr;
-
DWORD cbSid = GetLengthSid(psidIntegrityLevelLabel);
DWORD cbAceStart = offsetof(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
// We are about allocate memory for a ACL and an ACE so we need space for:
diff --git a/src/utilcode/stacktrace.cpp b/src/utilcode/stacktrace.cpp
index 3dee1802f4..204d8380e7 100644
--- a/src/utilcode/stacktrace.cpp
+++ b/src/utilcode/stacktrace.cpp
@@ -287,7 +287,6 @@ LPSTR FillSymbolSearchPathThrows(CQuickBytes &qb)
#endif
InlineSString<MAX_SYM_PATH> rcBuff ; // Working buffer
- WCHAR rcVerString[64]; // Extension for install directory.
int chTotal = 0; // How full is working buffer.
int ch;
diff --git a/src/utilcode/stresslog.cpp b/src/utilcode/stresslog.cpp
index 95c088fb86..f63ade8e8b 100644
--- a/src/utilcode/stresslog.cpp
+++ b/src/utilcode/stresslog.cpp
@@ -314,6 +314,7 @@ ThreadStressLog* StressLog::CreateThreadStressLog() {
// we fail.
ClrFlsSetValue(theLog.TLSslot, NULL);
}
+#pragma warning(suppress: 4101)
PAL_CPP_CATCH_DERIVED(OutOfMemoryException, obj)
{
// Just leave on any exception. Note: can't goto or return from within EX_CATCH...
diff --git a/src/utilcode/utilmessagebox.cpp b/src/utilcode/utilmessagebox.cpp
index 58fd7554c2..d4de492267 100644
--- a/src/utilcode/utilmessagebox.cpp
+++ b/src/utilcode/utilmessagebox.cpp
@@ -201,7 +201,6 @@ int UtilMessageBoxNonLocalizedVA(
// message box style was specified.
if (!RunningInteractive())
{
- HANDLE h;
StackSString message;
message.Printf(W(".NET Runtime version : %s - "), VER_FILEVERSION_STR_L);
diff --git a/src/vm/assemblynative.cpp b/src/vm/assemblynative.cpp
index f0cfe9376c..b6650709d0 100644
--- a/src/vm/assemblynative.cpp
+++ b/src/vm/assemblynative.cpp
@@ -439,7 +439,6 @@ void QCALLTYPE AssemblyNative::GetForwardedType(QCall::AssemblyHandle pAssembly,
BEGIN_QCALL;
- HRESULT hr;
LPCSTR pszNameSpace;
LPCSTR pszClassName;
mdToken mdImpl;
diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp
index e79d4ef073..ef4d63f405 100644
--- a/src/vm/ceeload.cpp
+++ b/src/vm/ceeload.cpp
@@ -674,7 +674,6 @@ GuidToMethodTableEntry *GuidToMethodTableHashTable::InsertValue(PTR_GUID pGuid,
CONTRACTL_END;
GuidToMethodTableEntry *pEntry = NULL;
- LookupContext ctx;
if (bReplaceIfFound)
{
diff --git a/src/vm/classcompat.cpp b/src/vm/classcompat.cpp
index af4c0d6630..cc67550acd 100644
--- a/src/vm/classcompat.cpp
+++ b/src/vm/classcompat.cpp
@@ -963,7 +963,6 @@ VOID MethodTableBuilder::BuildInteropVTable_PlaceMembers(
if(tokMember == bmtMethodImpl->rgMethodImplTokens[m].methodBody)
{
MethodDesc* desc = NULL;
- BOOL fIsMethod;
mdToken mdDecl = bmtMethodImpl->rgMethodImplTokens[m].methodDecl;
Substitution *pDeclSubst = &bmtMethodImpl->pMethodDeclSubsts[m];
diff --git a/src/vm/clrtocomcall.cpp b/src/vm/clrtocomcall.cpp
index 96d0722caf..372cf6f30a 100644
--- a/src/vm/clrtocomcall.cpp
+++ b/src/vm/clrtocomcall.cpp
@@ -256,7 +256,6 @@ MethodDesc *ComPlusCall::GetWinRTFactoryMethodForCtor(MethodDesc *pMDCtor, BOOL
SigParser ctorSig(pSig, cSig);
ULONG numArgs;
- CorElementType et;
IfFailThrow(ctorSig.GetCallingConv(NULL)); // calling convention
IfFailThrow(ctorSig.GetData(&numArgs)); // number of args
diff --git a/src/vm/comsynchronizable.cpp b/src/vm/comsynchronizable.cpp
index d5d57cd7c1..a476a77609 100644
--- a/src/vm/comsynchronizable.cpp
+++ b/src/vm/comsynchronizable.cpp
@@ -1505,7 +1505,6 @@ LPVOID F_CALL_CONV ThreadNative::FastGetDomain()
}
CONTRACTL_END;
- Thread *pThread;
AppDomain *pDomain;
OBJECTHANDLE ExposedObject;
diff --git a/src/vm/comtoclrcall.cpp b/src/vm/comtoclrcall.cpp
index 11f522431d..2a60f8c2df 100644
--- a/src/vm/comtoclrcall.cpp
+++ b/src/vm/comtoclrcall.cpp
@@ -1843,9 +1843,6 @@ MethodDesc* ComCall::GetILStubMethodDesc(MethodDesc *pCallMD, DWORD dwStubFlags)
}
CONTRACTL_END;
- PCCOR_SIGNATURE pSig;
- DWORD cSig;
-
// Get the call signature information
StubSigDesc sigDesc(pCallMD);
@@ -1902,7 +1899,6 @@ MethodDesc *ComCall::GetCtorForWinRTFactoryMethod(MethodTable *pClsMT, MethodDes
SigParser sig(pSig, cSig);
ULONG numArgs;
- CorElementType et;
IfFailThrow(sig.GetCallingConv(NULL)); // calling convention
IfFailThrow(sig.GetData(&numArgs)); // number of args
diff --git a/src/vm/gcenv.ee.common.cpp b/src/vm/gcenv.ee.common.cpp
index 6ec5735e2c..8f247b7f26 100644
--- a/src/vm/gcenv.ee.common.cpp
+++ b/src/vm/gcenv.ee.common.cpp
@@ -188,7 +188,6 @@ StackWalkAction GcStackCrawlCallBack(CrawlFrame* pCF, VOID* pData)
// KEEP IN SYNC WITH DacStackReferenceWalker::Callback in debug\daccess\daccess.cpp
//
- Frame *pFrame;
GCCONTEXT *gcctx = (GCCONTEXT*) pData;
#ifdef FEATURE_APPDOMAIN_RESOURCE_MONITORING
diff --git a/src/vm/gcheaputilities.cpp b/src/vm/gcheaputilities.cpp
index 3ffb3de479..fda07ce675 100644
--- a/src/vm/gcheaputilities.cpp
+++ b/src/vm/gcheaputilities.cpp
@@ -250,7 +250,6 @@ HRESULT InitializeDefaultGC()
LOG((LF_GC, LL_INFO100, "Standalone GC location not provided, using provided GC\n"));
g_gc_load_status = GC_LOAD_STATUS_DONE_LOAD;
- VersionInfo info;
GC_VersionInfo(&g_gc_version_info);
g_gc_load_status = GC_LOAD_STATUS_CALL_VERSIONINFO;
diff --git a/src/vm/interoputil.cpp b/src/vm/interoputil.cpp
index 630706bfc7..9caa4a0052 100644
--- a/src/vm/interoputil.cpp
+++ b/src/vm/interoputil.cpp
@@ -5709,7 +5709,7 @@ void WinRTGuidGenerator::PopulateNamesAppendNamePointers(MethodTable *pMT, SArra
// Scan through strings, and build list of pointers to them. This assumes that the strings are seperated by a single null character
PWSTR pszName = (PWSTR)pBuffer;
pszNames = (PCWSTR*)(pBuffer + cbNamesOld);
- for (COUNT_T i = 0, P; i < cNames; i++)
+ for (COUNT_T i = 0; i < cNames; i++)
{
pszNames[i] = pszName;
pszName += wcslen(pszName) + 1;
diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp
index 650a784255..80c5e65f35 100644
--- a/src/vm/jitinterface.cpp
+++ b/src/vm/jitinterface.cpp
@@ -13225,10 +13225,10 @@ BOOL LoadDynamicInfoEntry(Module *currentModule,
MethodDesc * pMD = NULL;
+#ifndef CROSSGEN_COMPILE
PCCOR_SIGNATURE pSig;
DWORD cSig;
-
- mdSignature token;
+#endif // CROSSGEN_COMPILE
size_t result = 0;
@@ -13345,12 +13345,13 @@ BOOL LoadDynamicInfoEntry(Module *currentModule,
case ENCODE_VARARGS_METHODDEF:
{
- token = TokenFromRid(
- CorSigUncompressData(pBlob),
- mdtMethodDef);
+ mdSignature token = TokenFromRid(
+ CorSigUncompressData(pBlob),
+ mdtMethodDef);
IfFailThrow(pInfoModule->GetMDImport()->GetSigOfMethodDef(token, &cSig, &pSig));
-
+ }
+ {
VarArgs:
result = (size_t) CORINFO_VARARGS_HANDLE(currentModule->GetVASigCookie(Signature(pSig, cSig)));
}
diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp
index 5daadddf35..8b507bf633 100644
--- a/src/vm/methodtablebuilder.cpp
+++ b/src/vm/methodtablebuilder.cpp
@@ -89,7 +89,6 @@ MethodTableBuilder::CreateClass( Module *pModule,
EEClass *pEEClass = NULL;
IMDInternalImport *pInternalImport;
- HRESULT hrToThrow;
//<TODO>============================================================================
// vtabsize and static size need to be converted from pointer sizes to #'s
diff --git a/src/vm/multicorejitplayer.cpp b/src/vm/multicorejitplayer.cpp
index 247fa0a14a..2030904443 100644
--- a/src/vm/multicorejitplayer.cpp
+++ b/src/vm/multicorejitplayer.cpp
@@ -888,8 +888,6 @@ bool MulticoreJitProfilePlayer::HandleModuleDependency(unsigned jitInfo)
if (!mod.m_pModule)
{
- HRESULT hr;
-
// Get the assembly name.
SString assemblyName;
assemblyName.SetASCII(mod.m_pRecord->GetAssemblyName(), mod.m_pRecord->AssemblyNameLen());
diff --git a/src/vm/olevariant.cpp b/src/vm/olevariant.cpp
index 35936bbc5a..4f62be6bdf 100644
--- a/src/vm/olevariant.cpp
+++ b/src/vm/olevariant.cpp
@@ -1146,6 +1146,7 @@ void SafeVariantClear(VARIANT* pVar)
SCAN_EHMARKER_END_TRY();
}
+#pragma warning(suppress: 4101)
PAL_CPP_CATCH_DERIVED(OutOfMemoryException, obj)
{
SCAN_EHMARKER_CATCH();
diff --git a/src/vm/readytoruninfo.cpp b/src/vm/readytoruninfo.cpp
index 699e159199..fa86145663 100644
--- a/src/vm/readytoruninfo.cpp
+++ b/src/vm/readytoruninfo.cpp
@@ -254,7 +254,6 @@ BOOL ReadyToRunInfo::GetEnclosingToken(IMDInternalImport * pImport, mdToken mdTy
}
CONTRACTL_END;
- mdToken mdEncloser;
switch (TypeFromToken(mdType))
{
case mdtTypeDef:
diff --git a/src/vm/runtimecallablewrapper.cpp b/src/vm/runtimecallablewrapper.cpp
index e43e0d3e90..6f833b0dcb 100644
--- a/src/vm/runtimecallablewrapper.cpp
+++ b/src/vm/runtimecallablewrapper.cpp
@@ -914,7 +914,6 @@ void WinRTClassFactory::Init()
// being binary breaking).
// Note that we just ignore activation attributes if they occur on the wrong type of class
LPCSTR attributeName;
- UINT numExpectedParams;
if (IsComposition())
{
attributeName = g_WindowsFoundationComposableAttributeClassName;
diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp
index 005c562907..a698c80317 100644
--- a/src/zap/zapinfo.cpp
+++ b/src/zap/zapinfo.cpp
@@ -2642,8 +2642,6 @@ WORD ZapInfo::getRelocTypeHint(void * target)
void ZapInfo::getModuleNativeEntryPointRange(void** pStart, void** pEnd)
{
- ULONG rvaStart, rvaEnd;
-
// Initialize outparams to default range of (0,0).
*pStart = 0;
*pEnd = 0;
diff --git a/src/zap/zapreadytorun.cpp b/src/zap/zapreadytorun.cpp
index e67f9d3ee1..099ef41c2c 100644
--- a/src/zap/zapreadytorun.cpp
+++ b/src/zap/zapreadytorun.cpp
@@ -408,9 +408,6 @@ void ZapImage::OutputTypesTableForReadyToRun(IMDInternalImport * pMDImport)
// Note on duplicate types with same name: there is not need to perform that check when building
// the hashtable. If such types were encountered, the R2R compilation would fail before reaching here.
- LPCUTF8 pszName;
- LPCUTF8 pszNameSpace;
-
// Save the TypeDefs to the hashtable
{
HENUMInternalHolder hEnum(pMDImport);