summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-02-01 13:41:03 -0800
committerJan Kotas <jkotas@microsoft.com>2016-02-01 13:41:03 -0800
commit9302d0e83762ee2888cbf921dfbe5f9a8540971f (patch)
tree6ec9c574fd7490bc6187fdb92da9953c13330b17 /src
parenta2cfe7239352d1934037965522fe5dd695873a3e (diff)
downloadcoreclr-9302d0e83762ee2888cbf921dfbe5f9a8540971f.tar.gz
coreclr-9302d0e83762ee2888cbf921dfbe5f9a8540971f.tar.bz2
coreclr-9302d0e83762ee2888cbf921dfbe5f9a8540971f.zip
Fix Unix build breaks
[tfs-changeset: 1571015]
Diffstat (limited to 'src')
-rw-r--r--src/vm/corhost.cpp3
-rw-r--r--src/vm/excep.cpp9
-rw-r--r--src/vm/securitypolicy.cpp10
3 files changed, 13 insertions, 9 deletions
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp
index 648708fac3..2a7cf45249 100644
--- a/src/vm/corhost.cpp
+++ b/src/vm/corhost.cpp
@@ -3109,8 +3109,7 @@ STDMETHODIMP CorHost2::UnloadAppDomain(DWORD dwDomainId, BOOL fWaitUntilDone)
else
{
_ASSERTE(!"Not reachable");
-#pragma prefast(suppress:33021, "This code is not reacheble so this assignment is fine.")
- hr = FALSE;
+ hr = S_FALSE;
}
}
END_ENTRYPOINT_NOTHROW;
diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp
index e8a17d4262..b2bb6663aa 100644
--- a/src/vm/excep.cpp
+++ b/src/vm/excep.cpp
@@ -4979,8 +4979,11 @@ BOOL InstallUnhandledExceptionFilter() {
// register UEF for SL.
if (g_pOriginalUnhandledExceptionFilter == FILTER_NOT_INSTALLED) {
-#pragma prefast(suppress:28725, "Calling to SetUnhandledExceptionFilter is intentional in this case.")
+ #pragma prefast(push)
+ #pragma prefast(suppress:28725, "Calling to SetUnhandledExceptionFilter is intentional in this case.")
g_pOriginalUnhandledExceptionFilter = SetUnhandledExceptionFilter(COMUnhandledExceptionFilter);
+ #pragma prefast(pop)
+
// make sure is set (ie. is not our special value to indicate unset)
LOG((LF_EH, LL_INFO10, "InstallUnhandledExceptionFilter registered UEF with OS for CoreCLR!\n"));
}
@@ -5015,8 +5018,10 @@ void UninstallUnhandledExceptionFilter() {
// We will be here only for CoreCLR on WLC or on Mac SL.
if (g_pOriginalUnhandledExceptionFilter != FILTER_NOT_INSTALLED) {
-#pragma prefast(suppress:28725, "Calling to SetUnhandledExceptionFilter is intentional in this case.")
+ #pragma prefast(push)
+ #pragma prefast(suppress:28725, "Calling to SetUnhandledExceptionFilter is intentional in this case.")
SetUnhandledExceptionFilter(g_pOriginalUnhandledExceptionFilter);
+ #pragma prefast(pop)
g_pOriginalUnhandledExceptionFilter = FILTER_NOT_INSTALLED;
LOG((LF_EH, LL_INFO10, "UninstallUnhandledExceptionFilter unregistered UEF from OS for CoreCLR!\n"));
diff --git a/src/vm/securitypolicy.cpp b/src/vm/securitypolicy.cpp
index a0cf676417..082be54f88 100644
--- a/src/vm/securitypolicy.cpp
+++ b/src/vm/securitypolicy.cpp
@@ -724,16 +724,16 @@ size_t SecurityPolicy::GetLongPathNameHelper( const WCHAR* wszShortPath, __inout
if (index == 0)
break;
- #ifdef _PREFAST_
+ #ifdef _PREFAST_
#pragma prefast(push)
#pragma prefast(disable:26001, "suppress prefast warning about underflow by doing index-1 which is checked above.")
- #endif // _PREFAST_
-
+ #endif // _PREFAST_
+
wszIntermediateBuffer[index-1] = W('\0');
- #ifdef _PREFAST_
+ #ifdef _PREFAST_
#pragma prefast(pop)
- #endif
+ #endif
size = WszGetLongPathName(wszIntermediateBuffer, wszBuffer, MAX_LONGPATH);