diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2015-03-27 23:30:10 +0100 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2015-04-01 21:39:28 +0200 |
commit | de8b85b643ac08d69696ad078846424b69ae651f (patch) | |
tree | 3c8f416945ebb2768eeb1f26a5d09b5f4dcb2202 /src/binder/assemblybinder.cpp | |
parent | 898cdcf05ae334252b354a1f5bae9e26be1912ec (diff) | |
download | coreclr-de8b85b643ac08d69696ad078846424b69ae651f.tar.gz coreclr-de8b85b643ac08d69696ad078846424b69ae651f.tar.bz2 coreclr-de8b85b643ac08d69696ad078846424b69ae651f.zip |
Fix next round of warning types
This change fixes the following warnings:
1) Assignment in a condition should be wrapped in ()
2) Priority of && / || should be indicated by parentheses.
3) Unknown #pragma optimize ifdefed out for non MSVC
4) Unused functions deleted or put under #ifdef
5) Extra tokens warning disabling moved to the CMakeLists.txt in the src/inc
6) Self assignment of a member or local variable
7) Assigning ~0 to a bitfield member that was just 8 bit wide
It also fixes a bug in the STRESS_LOGxx macro invocation in exceptionhandling.cpp and
stackwalk.cpp related to recent adding the DBG_ADDR macro usage. This macro expanded
a single parameter into two expressions to extract high / low 32 bits separately.
But the STRESS_LOGxx parameters are passed to the StressLog::LogMsg method as follows:
(void*)(size_t)(data1)
That means that the expanded pair x, y would be inserted as data 1 and that leads
to ignoring the x due to the comma operator.
Diffstat (limited to 'src/binder/assemblybinder.cpp')
-rw-r--r-- | src/binder/assemblybinder.cpp | 63 |
1 files changed, 1 insertions, 62 deletions
diff --git a/src/binder/assemblybinder.cpp b/src/binder/assemblybinder.cpp index 308e1229df..89a3c0fb3f 100644 --- a/src/binder/assemblybinder.cpp +++ b/src/binder/assemblybinder.cpp @@ -469,66 +469,6 @@ namespace BINDER_SPACE Exit: return hr; } - - // Host assembly "equivalence" relation - HRESULT IsValidHostAssembly(AssemblyName *pProposedAssemblyName, - AssemblyName *pRequestedAssemblyName, - VersionMatchMode versionMatchMode, - BOOL fRequireHigherSV, - BOOL *pFIsValidHostAssembly) - { - HRESULT hr = S_OK; - - AssemblyVersion *pProposedVersion = pProposedAssemblyName->GetVersion(); - AssemblyVersion *pRequestedVersion = pRequestedAssemblyName->GetVersion(); - - if (pProposedVersion->IsEqualFeatureVersion(pRequestedVersion)) - { - if (fRequireHigherSV) - { - *pFIsValidHostAssembly = - pProposedVersion->IsLargerServiceVersion(pRequestedVersion); - } - else if (versionMatchMode == kVersionExact) - { - *pFIsValidHostAssembly = - pProposedVersion->IsEqualServiceVersion(pRequestedVersion); - } - else - { - *pFIsValidHostAssembly = - (pProposedVersion->IsLargerServiceVersion(pRequestedVersion) || - pProposedVersion->IsEqualServiceVersion(pRequestedVersion)); - } - } - else if ((versionMatchMode == kVersionFeatureRollForward) && - (pProposedVersion->IsLargerFeatureVersion(pRequestedVersion))) - { - *pFIsValidHostAssembly = TRUE; - } - else - { - *pFIsValidHostAssembly = FALSE; - } - - return hr; - } - - inline DWORD BindingStoreEnumToDWORD(INT32 kBindingStore) - { - switch (kBindingStore) - { - case 0: - return kBindingStoreGAC; - case 1: - return kBindingStoreManifest; - case 2: - return kBindingStoreHost; - default: - _ASSERTE(0); - return 0; - } - } }; /* static */ @@ -700,8 +640,7 @@ namespace BINDER_SPACE #ifdef FEATURE_VERSIONING_LOG hr = LogBindResult(pApplicationContext, hr, &bindResult); #else // FEATURE_VERSIONING_LOG - // Shut up GCC - hr = hr; + ; #endif // FEATURE_VERSIONING_LOG #ifndef CROSSGEN_COMPILE |