summaryrefslogtreecommitdiff
path: root/src/ToolBox
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 /src/ToolBox
parentf5794741fdcacc227db3405f462a44a681c6d0d2 (diff)
downloadcoreclr-4c036c0801950f48c3316aeef414819a1c43b194.tar.gz
coreclr-4c036c0801950f48c3316aeef414819a1c43b194.tar.bz2
coreclr-4c036c0801950f48c3316aeef414819a1c43b194.zip
Fix prefast warnings in CLR code
[tfs-changeset: 1507366]
Diffstat (limited to 'src/ToolBox')
-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
6 files changed, 10 insertions, 10 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
)
{