summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Zemtsov <Eugene.Zemtsov@microsoft.com>2015-07-29 16:38:07 -0700
committerEugene Zemtsov <Eugene.Zemtsov@microsoft.com>2015-07-29 16:38:07 -0700
commit4c036c0801950f48c3316aeef414819a1c43b194 (patch)
tree3fd1f84d92ed9cba1efb4b10b27c003298f98af0
parentf5794741fdcacc227db3405f462a44a681c6d0d2 (diff)
downloadcoreclr-4c036c0801950f48c3316aeef414819a1c43b194.tar.gz
coreclr-4c036c0801950f48c3316aeef414819a1c43b194.tar.bz2
coreclr-4c036c0801950f48c3316aeef414819a1c43b194.zip
Fix prefast warnings in CLR code
[tfs-changeset: 1507366]
-rw-r--r--src/ToolBox/SOS/Strike/disasm.cpp2
-rw-r--r--src/ToolBox/SOS/Strike/disasm.h2
-rw-r--r--src/ToolBox/SOS/Strike/strike.cpp4
-rw-r--r--src/ToolBox/SOS/Strike/util.cpp4
-rw-r--r--src/ToolBox/SOS/Strike/util.h2
-rw-r--r--src/ToolBox/SOS/Strike/vm.cpp6
-rw-r--r--src/coreclr/hosts/corerun/corerun.cpp4
-rw-r--r--src/debug/di/symbolinfo.h2
-rw-r--r--src/debug/ee/debugger.h4
-rw-r--r--src/debug/ee/rcthread.cpp2
-rw-r--r--src/dlls/mscoree/mscoree.cpp2
-rw-r--r--src/inc/marvin32.h6
-rw-r--r--src/inc/sxshelpers.h10
-rw-r--r--src/inc/utilcode.h2
-rw-r--r--src/md/compiler/importhelper.cpp2
-rw-r--r--src/md/tables/table.h2
-rw-r--r--src/tools/util/consoleargs.cpp6
-rw-r--r--src/tools/util/consoleargs.h6
-rw-r--r--src/vm/interoputil.cpp2
-rw-r--r--src/vm/interoputil.h2
-rw-r--r--src/vm/marvin32.cpp2
-rw-r--r--src/vm/runtimecallablewrapper.cpp2
-rw-r--r--src/vm/runtimecallablewrapper.h2
23 files changed, 39 insertions, 39 deletions
diff --git a/src/ToolBox/SOS/Strike/disasm.cpp b/src/ToolBox/SOS/Strike/disasm.cpp
index 0d27c63bf0..8c107885d7 100644
--- a/src/ToolBox/SOS/Strike/disasm.cpp
+++ b/src/ToolBox/SOS/Strike/disasm.cpp
@@ -435,7 +435,7 @@ void UnassemblyUnmanaged(DWORD_PTR IP, BOOL bSuppressLines)
}
-void DisasmAndClean (DWORD_PTR &IP, __out_ecount (length) __out_opt char *line, ULONG length)
+void DisasmAndClean (DWORD_PTR &IP, __out_ecount_opt(length) char *line, ULONG length)
{
ULONG64 vIP = TO_CDADDR(IP);
g_ExtControl->Disassemble (vIP, 0, line, length, NULL, &vIP);
diff --git a/src/ToolBox/SOS/Strike/disasm.h b/src/ToolBox/SOS/Strike/disasm.h
index 98dbd48ca4..dde2846999 100644
--- a/src/ToolBox/SOS/Strike/disasm.h
+++ b/src/ToolBox/SOS/Strike/disasm.h
@@ -78,7 +78,7 @@ BOOL GetCalleeSite (DWORD_PTR IP, DWORD_PTR &IPCallee);
HRESULT CheckEEDll ();
-void DisasmAndClean (DWORD_PTR &IP, __out_ecount (length) __out_opt char *line, ULONG length);
+void DisasmAndClean (DWORD_PTR &IP, __out_ecount_opt(length) char *line, ULONG length);
INT_PTR GetValueFromExpr(__in __in_z char *ptr, INT_PTR &value);
diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
index f87fa925a5..0c2f97f625 100644
--- a/src/ToolBox/SOS/Strike/strike.cpp
+++ b/src/ToolBox/SOS/Strike/strike.cpp
@@ -2065,7 +2065,7 @@ CLRDATA_ADDRESS isSecurityExceptionObj(CLRDATA_ADDRESS mtObj)
// Fill the passed in buffer with a text header for generated exception information.
// Returns the number of characters in the wszBuffer array on exit.
// If NULL is passed for wszBuffer, just returns the number of characters needed.
-size_t AddExceptionHeader (__out_ecount (bufferLength) __out_opt WCHAR *wszBuffer, size_t bufferLength)
+size_t AddExceptionHeader (__out_ecount_opt(bufferLength) WCHAR *wszBuffer, size_t bufferLength)
{
#ifdef _TARGET_WIN64_
const WCHAR *wszHeader = W(" SP IP Function\n");
@@ -2219,7 +2219,7 @@ BOOL IsAsyncException(const DacpExceptionObjectData & excData)
#define SOS_STACKTRACE_SHOWEXPLICITFRAMES 0x00000002
size_t FormatGeneratedException (DWORD_PTR dataPtr,
UINT bytes,
- __out_ecount (bufferLength) __out_opt WCHAR *wszBuffer,
+ __out_ecount_opt(bufferLength) WCHAR *wszBuffer,
size_t bufferLength,
BOOL bAsync,
BOOL bNestedCase=FALSE,
diff --git a/src/ToolBox/SOS/Strike/util.cpp b/src/ToolBox/SOS/Strike/util.cpp
index 275113a9dc..e1890daa26 100644
--- a/src/ToolBox/SOS/Strike/util.cpp
+++ b/src/ToolBox/SOS/Strike/util.cpp
@@ -1493,7 +1493,7 @@ const char * ElementTypeNamespace(unsigned type)
return CorElementTypeNamespace[type];
}
-void ComposeName_s(CorElementType Type, __out_ecount(bufSize) LPSTR buffer, size_t capacity_buffer)
+void ComposeName_s(CorElementType Type, __out_ecount(capacity_buffer) LPSTR buffer, size_t capacity_buffer)
{
const char *p = ElementTypeNamespace(Type);
if ((p) && (*p != '\0'))
@@ -2666,7 +2666,7 @@ BOOL DebuggerModuleNamesMatch (CLRDATA_ADDRESS PEFileAddr, __in __in_z LPSTR mNa
return FALSE;
}
-DWORD_PTR *ModuleFromName(__in __in_z __in_opt LPSTR mName, int *numModule)
+DWORD_PTR *ModuleFromName(__in_opt LPSTR mName, int *numModule)
{
if (numModule == NULL)
return NULL;
diff --git a/src/ToolBox/SOS/Strike/util.h b/src/ToolBox/SOS/Strike/util.h
index 5b0c40f93c..7b9d96d997 100644
--- a/src/ToolBox/SOS/Strike/util.h
+++ b/src/ToolBox/SOS/Strike/util.h
@@ -1929,7 +1929,7 @@ BOOL IsObjectArray (DacpObjectData *pData);
* You must clean up the return value of this array by calling delete [] on it, or using the
* ArrayHolder class.
*/
-DWORD_PTR *ModuleFromName(__in __in_z __in_opt LPSTR name, int *numModules);
+DWORD_PTR *ModuleFromName(__in_opt LPSTR name, int *numModules);
void GetInfoFromName(DWORD_PTR ModuleAddr, const char* name);
void GetInfoFromModule (DWORD_PTR ModuleAddr, ULONG token, DWORD_PTR *ret=NULL);
diff --git a/src/ToolBox/SOS/Strike/vm.cpp b/src/ToolBox/SOS/Strike/vm.cpp
index 61f45cf96e..b0b9ede328 100644
--- a/src/ToolBox/SOS/Strike/vm.cpp
+++ b/src/ToolBox/SOS/Strike/vm.cpp
@@ -398,7 +398,7 @@ PrintVmStats(
PSTR
VmProtectToString(
IN DWORD Protect,
- __out_ecount (capacity_buffer) OUT PSTR Buffer,
+ __out_ecount(capacity_Buffer) OUT PSTR Buffer,
size_t capacity_Buffer
)
{
@@ -440,7 +440,7 @@ VmProtectToString(
PSTR
VmStateToString(
IN DWORD State,
- __out_ecount (capacity_buffer) OUT PSTR Buffer,
+ __out_ecount(capacity_Buffer) OUT PSTR Buffer,
size_t capacity_Buffer
)
{
@@ -475,7 +475,7 @@ VmStateToString(
PSTR
VmTypeToString(
IN DWORD Type,
- __out_ecount (capacity_buffer) OUT PSTR Buffer,
+ __out_ecount(capacity_Buffer) OUT PSTR Buffer,
size_t capacity_Buffer
)
{
diff --git a/src/coreclr/hosts/corerun/corerun.cpp b/src/coreclr/hosts/corerun/corerun.cpp
index 6766b6ba17..6fc58d5343 100644
--- a/src/coreclr/hosts/corerun/corerun.cpp
+++ b/src/coreclr/hosts/corerun/corerun.cpp
@@ -415,7 +415,7 @@ bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo
log << W("Loading: ") << managedAssemblyFullName << Logger::endl;
wcscpy_s(appLocalWinmetadata, appPath);
- wcscat(appLocalWinmetadata, W("\\WinMetadata"));
+ wcscat_s(appLocalWinmetadata, W("\\WinMetadata"));
DWORD dwAttrib = ::GetFileAttributes(appLocalWinmetadata);
bool appLocalWinMDexists = dwAttrib != INVALID_FILE_ATTRIBUTES && (dwAttrib & FILE_ATTRIBUTE_DIRECTORY);
@@ -424,7 +424,7 @@ bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo
wcscpy_s(appLocalWinmetadata, W(""));
}
wcscpy_s(appNiPath, appPath);
- wcscat(appNiPath, W("NI"));
+ wcscat_s(appNiPath, W("NI"));
wcscat_s(appNiPath, MAX_PATH * 2, W(";"));
wcscat_s(appNiPath, MAX_PATH * 2, appPath);
diff --git a/src/debug/di/symbolinfo.h b/src/debug/di/symbolinfo.h
index 46c7ff9e93..271fb75839 100644
--- a/src/debug/di/symbolinfo.h
+++ b/src/debug/di/symbolinfo.h
@@ -117,7 +117,7 @@ public:
STDMETHOD(GetTypeDefProps)( // S_OK or error.
mdTypeDef td, // [IN] TypeDef token for inquiry.
- __out_ecount_part_opt(cchTypeDef, pchTypeDef)
+ __out_ecount_part_opt(cchTypeDef, *pchTypeDef)
LPWSTR szTypeDef, // [OUT] Put name here.
ULONG cchTypeDef, // [IN] size of name buffer in wide chars.
ULONG *pchTypeDef, // [OUT] put size of name (wide chars) here.
diff --git a/src/debug/ee/debugger.h b/src/debug/ee/debugger.h
index 9b98f6bde6..2a1ca0cf10 100644
--- a/src/debug/ee/debugger.h
+++ b/src/debug/ee/debugger.h
@@ -2059,7 +2059,7 @@ public:
void SendInterceptExceptionComplete(Thread *thread);
HRESULT AttachDebuggerForBreakpoint(Thread *thread,
- __in_opt __in_z WCHAR *wszLaunchReason);
+ __in_opt WCHAR *wszLaunchReason);
void ThreadIsSafe(Thread *thread);
@@ -3591,7 +3591,7 @@ void DbgLogHelper(DebuggerIPCEventType event);
// Helpers for cleanup
// These are various utility functions, mainly where we factor out code.
//-----------------------------------------------------------------------------
-void GetPidDecoratedName(__out_z __in_ecount(cBufSizeInChars) WCHAR * pBuf,
+void GetPidDecoratedName(__out_ecount(cBufSizeInChars) WCHAR * pBuf,
int cBufSizeInChars,
const WCHAR * pPrefix);
diff --git a/src/debug/ee/rcthread.cpp b/src/debug/ee/rcthread.cpp
index cf19d6fbec..442c0748a3 100644
--- a/src/debug/ee/rcthread.cpp
+++ b/src/debug/ee/rcthread.cpp
@@ -122,7 +122,7 @@ void DebuggerRCThread::CloseIPCHandles()
// cBufSizeInChars - the size of the buffer in characters, including the null.
// pPrefx - The undecorated name of the event.
//-----------------------------------------------------------------------------
-void GetPidDecoratedName(__out_z __in_ecount(cBufSizeInChars) WCHAR * pBuf,
+void GetPidDecoratedName(__out_ecount(cBufSizeInChars) WCHAR * pBuf,
int cBufSizeInChars,
const WCHAR * pPrefix)
{
diff --git a/src/dlls/mscoree/mscoree.cpp b/src/dlls/mscoree/mscoree.cpp
index 42c9ade480..712fb89e68 100644
--- a/src/dlls/mscoree/mscoree.cpp
+++ b/src/dlls/mscoree/mscoree.cpp
@@ -1142,7 +1142,7 @@ STDAPI LoadLibraryShimInternal(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvRe
if (!PAL_GetPALDirectoryW(szDllPath, _MAX_PATH)) {
IfFailGo(HRESULT_FROM_GetLastError());
}
- wcsncat(szDllPath, szDllName, _MAX_PATH - wcslen(szDllPath));
+ wcsncat_s(szDllPath, _MAX_PATH+1, szDllName, _MAX_PATH - wcslen(szDllPath));
if ((*phModDll = WszLoadLibrary(szDllPath)) == NULL)
IfFailGo(HRESULT_FROM_GetLastError());
diff --git a/src/inc/marvin32.h b/src/inc/marvin32.h
index 72ab8d855c..8867b80032 100644
--- a/src/inc/marvin32.h
+++ b/src/inc/marvin32.h
@@ -64,7 +64,7 @@ typedef const SYMCRYPT_MARVIN32_STATE *PCSYMCRYPT_MARVIN32_STATE;
//
HRESULT SymCryptMarvin32ExpandSeed(
__out PSYMCRYPT_MARVIN32_EXPANDED_SEED pExpandedSeed,
- __in_ecount(cbKey) PCBYTE pbSeed,
+ __in_ecount(cbSeed) PCBYTE pbSeed,
SIZE_T cbSeed);
VOID SymCryptMarvin32Init(_Out_ PSYMCRYPT_MARVIN32_STATE pState,
@@ -72,7 +72,7 @@ VOID SymCryptMarvin32Init(_Out_ PSYMCRYPT_MARVIN32_STATE pState,
VOID SymCryptMarvin32Result(
_Inout_ PSYMCRYPT_MARVIN32_STATE pState,
- _Out_writes_(SYMCRYPT_MARVIN32_RESULT_SIZE) PBYTE pbResult);
+ _Out_ PBYTE pbResult);
VOID SymCryptMarvin32Append(_Inout_ SYMCRYPT_MARVIN32_STATE * state,
_In_reads_bytes_(cbData) PCBYTE pbData,
@@ -83,4 +83,4 @@ VOID SymCryptMarvin32(
__in_ecount(cbData) PCBYTE pbData,
SIZE_T cbData,
__out_ecount(SYMCRYPT_MARVIN32_RESULT_SIZE) PBYTE pbResult);
-#endif // MARVIN32_INCLUDED \ No newline at end of file
+#endif // MARVIN32_INCLUDED
diff --git a/src/inc/sxshelpers.h b/src/inc/sxshelpers.h
index d52f89bf27..3fa450d5b9 100644
--- a/src/inc/sxshelpers.h
+++ b/src/inc/sxshelpers.h
@@ -44,7 +44,7 @@
HRESULT FindRuntimeVersionFromRegistry(
REFCLSID rclsid,
__deref_out_z LPWSTR *ppwzRuntimeVersion,
- __deref_out_z __out_opt LPWSTR *ppwzSupportedVersions);
+ __deref_out_opt LPWSTR *ppwzSupportedVersions);
// Find assembly info from registry for rclsid
// If succeeded, *ppwzClassName, *ppwzAssemblyString, *ppwzCodeBase
@@ -75,10 +75,10 @@ HRESULT FindShimInfoFromRegistry(
HRESULT FindShimInfoFromWin32(
REFCLSID rclsid,
BOOL bLoadRecord,
- __deref_out_z __deref_opt_out_opt LPWSTR *ppwzRuntimeVersion,
- __deref_out_z __deref_opt_out_opt LPWSTR *ppwszSupportedRuntimeVersions,
- __deref_out_z __deref_opt_out_opt LPWSTR *ppwzClassName,
- __deref_out_z __deref_opt_out_opt LPWSTR *ppwzAssemblyString,
+ __deref_opt_out_opt LPWSTR *ppwzRuntimeVersion,
+ __deref_opt_out_opt LPWSTR *ppwszSupportedRuntimeVersions,
+ __deref_opt_out_opt LPWSTR *ppwzClassName,
+ __deref_opt_out_opt LPWSTR *ppwzAssemblyString,
BOOL *pfRegFreePIA);
// Get information from the Win32 fusion about the config file and the application base.
diff --git a/src/inc/utilcode.h b/src/inc/utilcode.h
index bcb8713018..46667706f7 100644
--- a/src/inc/utilcode.h
+++ b/src/inc/utilcode.h
@@ -4466,7 +4466,7 @@ HRESULT GetCurrentModuleFileName(__out_ecount(*pcchBuffer) LPWSTR pBuffer, __ino
void GetDebuggerSettingInfo(SString &debuggerKeyValue, BOOL *pfAuto);
HRESULT GetDebuggerSettingInfoWorker(__out_ecount_part_opt(*pcchDebuggerString, *pcchDebuggerString) LPWSTR wszDebuggerString, DWORD * pcchDebuggerString, BOOL * pfAuto);
-void TrimWhiteSpace(__deref_inout_ecount(*pcch) LPCWSTR *pwsz, __inout LPDWORD pcch);
+void TrimWhiteSpace(__inout_ecount(*pcch) LPCWSTR *pwsz, __inout LPDWORD pcch);
//*****************************************************************************
diff --git a/src/md/compiler/importhelper.cpp b/src/md/compiler/importhelper.cpp
index 4ae87baf40..75764fec40 100644
--- a/src/md/compiler/importhelper.cpp
+++ b/src/md/compiler/importhelper.cpp
@@ -3391,7 +3391,7 @@ HRESULT ImportHelper::CompareAssemblyRefToAssembly( // S_OK, S_FALSE or error
if (IsAfPublicKey(dwFlags1) &&
(cbPublicKeyOrToken1 != cbPublicKey2 ||
memcmp(pbPublicKeyOrToken1, pbPublicKey2, cbPublicKeyOrToken1)))
- return FALSE;
+ return S_FALSE;
// Otherwise we need to compress the def public key into a token.
if (!StrongNameTokenFromPublicKey((BYTE*)pbPublicKey2,
diff --git a/src/md/tables/table.h b/src/md/tables/table.h
index f0b40f285b..99b74a85e5 100644
--- a/src/md/tables/table.h
+++ b/src/md/tables/table.h
@@ -208,7 +208,7 @@ public:
__checkReturn
inline HRESULT AddRecord(
- __out_bcount(m_cbRecordSize) BYTE **ppbRecord,
+ __out BYTE **ppbRecord,
__out UINT32 *pnIndex)
{
return m_RecordStorage.AddRecord(ppbRecord, pnIndex);
diff --git a/src/tools/util/consoleargs.cpp b/src/tools/util/consoleargs.cpp
index 5bf88a5a59..fd89726541 100644
--- a/src/tools/util/consoleargs.cpp
+++ b/src/tools/util/consoleargs.cpp
@@ -337,7 +337,7 @@ void ConsoleArgs::CleanUpArgs()
}
}
-bool ConsoleArgs::GetFullFileName(LPCWSTR szSource, __deref_out_ecount(cchFilenameBuffer) LPWSTR filenameBuffer, DWORD cchFilenameBuffer, bool fOutputFilename)
+bool ConsoleArgs::GetFullFileName(LPCWSTR szSource, __out_ecount(cchFilenameBuffer) LPWSTR filenameBuffer, DWORD cchFilenameBuffer, bool fOutputFilename)
{
#ifdef PLATFORM_UNIX
WCHAR tempBuffer[MAX_PATH];
@@ -367,7 +367,7 @@ bool ConsoleArgs::GetFullFileName(LPCWSTR szSource, __deref_out_ecount(cchFilena
// Clear previous error message if any and set the new one by copying into m_lastErrorMessage.
// We are responsible for freeing the memory destruction.
//
-void ConsoleArgs::SetErrorMessage(__deref_in LPCWSTR pwzMessage)
+void ConsoleArgs::SetErrorMessage(__in LPCWSTR pwzMessage)
{
if (m_lastErrorMessage != nullptr)
{
@@ -675,7 +675,7 @@ LEADINGWHITE:
// We expand any response files that may be contained in the args and return a new
// set of args, pargc2 and pppargv2 that contain the full flat command line.
//
-bool ConsoleArgs::ExpandResponseFiles(__in int argc, __deref_in_ecount(argc) const LPCWSTR * argv, __deref_out int * pargc2, __out LPWSTR ** pppargv2)
+bool ConsoleArgs::ExpandResponseFiles(__in int argc, __deref_in_ecount(argc) const LPCWSTR * argv, int * pargc2, __deref_out_ecount(*pargc2) LPWSTR ** pppargv2)
{
*pargc2 = 0;
*pppargv2 = NULL;
diff --git a/src/tools/util/consoleargs.h b/src/tools/util/consoleargs.h
index e9bc93bcdc..ed4a85659e 100644
--- a/src/tools/util/consoleargs.h
+++ b/src/tools/util/consoleargs.h
@@ -21,7 +21,7 @@ class ConsoleArgs
{
public:
// Place the fully-qualified filename in the given output buffer
- bool GetFullFileName(LPCWSTR szSource, __deref_out_ecount(cbFilenameBuffer) LPWSTR filenameBuffer, DWORD cbFilenameBuffer, bool fOutputFilename);
+ bool GetFullFileName(LPCWSTR szSource, __out_ecount(cbFilenameBuffer) LPWSTR filenameBuffer, DWORD cbFilenameBuffer, bool fOutputFilename);
ConsoleArgs() :
m_rgArgs(NULL),
@@ -37,7 +37,7 @@ public:
};
// returns false if there are errors
- bool ExpandResponseFiles(__in int argc, __deref_in_ecount(argc) const LPCWSTR * argv, __deref_out int * pargc2, __out LPWSTR ** pppargv2);
+ bool ExpandResponseFiles(__in int argc, __deref_in_ecount(argc) const LPCWSTR * argv, int * pargc2, __deref_out_ecount(*pargc2) LPWSTR ** pppargv2);
// Frees all memory used by the arg list and the argv/argc array
void CleanUpArgs();
@@ -55,7 +55,7 @@ public:
}
private:
- void SetErrorMessage(__deref_in LPCWSTR pwzMessage);
+ void SetErrorMessage(__in LPCWSTR pwzMessage);
b_tree * MakeLeaf( LPCWSTR szText);
void CleanupTree( b_tree * root);
HRESULT TreeAdd( b_tree ** root, LPCWSTR szAdd);
diff --git a/src/vm/interoputil.cpp b/src/vm/interoputil.cpp
index 6f672c041b..2008938f6d 100644
--- a/src/vm/interoputil.cpp
+++ b/src/vm/interoputil.cpp
@@ -5183,7 +5183,7 @@ void GetComClassFromCLSID(REFCLSID clsid, STRINGREF srefServer, OBJECTREF *pRef)
_ASSERTE(*pRef != NULL);
}
-void GetComClassHelper(OBJECTREF *pRef, EEClassFactoryInfoHashTable *pClassFactHash, ClassFactoryInfo *pClassFactInfo, __in_opt __in_z WCHAR *wszProgID)
+void GetComClassHelper(OBJECTREF *pRef, EEClassFactoryInfoHashTable *pClassFactHash, ClassFactoryInfo *pClassFactInfo, __in_opt WCHAR *wszProgID)
{
CONTRACTL
{
diff --git a/src/vm/interoputil.h b/src/vm/interoputil.h
index 72224a8797..f2404fa17f 100644
--- a/src/vm/interoputil.h
+++ b/src/vm/interoputil.h
@@ -392,7 +392,7 @@ void GetComClassFromCLSID(REFCLSID clsid, STRINGREF srefServer, OBJECTREF* pRef)
void GetComClassHelper(OBJECTREF *pRef,
EEClassFactoryInfoHashTable *pClassFactHash,
ClassFactoryInfo *pClassFactInfo,
- __in_opt __in_z WCHAR *wszProgID);
+ __in_opt WCHAR *wszProgID);
//-------------------------------------------------------------
// check if a ComClassFactory/WinRTClassFactory has been setup for this class
diff --git a/src/vm/marvin32.cpp b/src/vm/marvin32.cpp
index dd630b9e54..ea3fcf67dc 100644
--- a/src/vm/marvin32.cpp
+++ b/src/vm/marvin32.cpp
@@ -40,7 +40,7 @@ static const int rotate[4] = {
HRESULT
SymCryptMarvin32ExpandSeed(
__out PSYMCRYPT_MARVIN32_EXPANDED_SEED pExpandedSeed,
- __in_ecount(cbKey) PCBYTE pbSeed,
+ __in_ecount(cbSeed) PCBYTE pbSeed,
SIZE_T cbSeed )
{
HRESULT retVal = S_OK;
diff --git a/src/vm/runtimecallablewrapper.cpp b/src/vm/runtimecallablewrapper.cpp
index ef267c2201..a18bd6684a 100644
--- a/src/vm/runtimecallablewrapper.cpp
+++ b/src/vm/runtimecallablewrapper.cpp
@@ -679,7 +679,7 @@ OBJECTREF ComClassFactory::CreateInstance(MethodTable* pMTClass, BOOL ForManaged
//--------------------------------------------------------------
// Init the ComClassFactory.
-void ComClassFactory::Init(__in_opt __in_z WCHAR* pwszProgID, __in_opt __in_z WCHAR* pwszServer, MethodTable* pClassMT)
+void ComClassFactory::Init(__in_opt WCHAR* pwszProgID, __in_opt WCHAR* pwszServer, MethodTable* pClassMT)
{
LIMITED_METHOD_CONTRACT;
diff --git a/src/vm/runtimecallablewrapper.h b/src/vm/runtimecallablewrapper.h
index d13e43a64a..3289bc3045 100644
--- a/src/vm/runtimecallablewrapper.h
+++ b/src/vm/runtimecallablewrapper.h
@@ -1268,7 +1268,7 @@ public :
//--------------------------------------------------------------
// Init the ComClassFactory
- void Init(__in_opt __in_z WCHAR* pwszProgID, __in_opt __in_z WCHAR* pwszServer, MethodTable* pClassMT);
+ void Init(__in_opt WCHAR* pwszProgID, __in_opt WCHAR* pwszServer, MethodTable* pClassMT);
//-------------------------------------------------------------
// create instance, calls IClassFactory::CreateInstance