From 1e787356393276f38f4600232722076d2d9311e2 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Thu, 26 Mar 2015 08:19:22 +0100 Subject: Fix about 12 kinds of warnings over the codebase This change fixes: 1) Member initiazalization order in class constructor didn't correspond to the member order in some classes 2) Objects with vtables were copied via memcpy. While this is intentional, cast of the pointers to void* is required to silence clang warning 3) Switch case statements containing values of different enums 4) Casting int to pointer 5) Missing return value in methods with _ASSERTE 6) Class name classifier on methods in the .h 7) Invalid position of the DECLSPEC_ALIGN at few places - it had no effect 8) Invalid position of the 'used' attribute 9) Issue with comparing holders to NULL 10) Operator 'new' returning NULL without being marked with throw() or noexcept 11) Variables marked as 'extern' at the declaration / initialization place 12) Data structure declared as struct at one place and forward declared as class at another Some disabled warnings were no longer happening, so options to disable them were removed too --- src/vm/zapsig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vm/zapsig.cpp') diff --git a/src/vm/zapsig.cpp b/src/vm/zapsig.cpp index a0146aeb7d..77be8d8aa1 100644 --- a/src/vm/zapsig.cpp +++ b/src/vm/zapsig.cpp @@ -66,7 +66,7 @@ BOOL ZapSig::GetSignatureForTypeDesc(TypeDesc * desc, SigBuilder * pSigBuilder) } else { - switch (elemType) + switch ((DWORD)elemType) { case ELEMENT_TYPE_FNPTR: { @@ -365,7 +365,7 @@ BOOL ZapSig::GetSignatureForTypeHandle(TypeHandle handle, CorElementType sigType = CorSigUncompressElementType(pSig); CorElementType handleType = handle.GetSignatureCorElementType(); - switch (sigType) + switch ((DWORD)sigType) { default: { -- cgit v1.2.3