summaryrefslogtreecommitdiff
path: root/src/binder
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2019-05-14 19:07:53 -0700
committerGitHub <noreply@github.com>2019-05-14 19:07:53 -0700
commit718598334310f6ad331ba2893ee4557beffaa74c (patch)
tree7bc4830b29442e79be150b67dc0f67473e5ba681 /src/binder
parent6a85ca560a7dfa109c6f17c0b76d93373dbd5a00 (diff)
downloadcoreclr-718598334310f6ad331ba2893ee4557beffaa74c.tar.gz
coreclr-718598334310f6ad331ba2893ee4557beffaa74c.tar.bz2
coreclr-718598334310f6ad331ba2893ee4557beffaa74c.zip
Fix issues reported by PREfast static analysis tool (#24577)
Diffstat (limited to 'src/binder')
-rw-r--r--src/binder/applicationcontext.cpp2
-rw-r--r--src/binder/clrprivbinderassemblyloadcontext.cpp5
-rw-r--r--src/binder/inc/applicationcontext.hpp13
-rw-r--r--src/binder/inc/assemblyidentity.hpp2
-rw-r--r--src/binder/inc/fusionassemblyname.hpp2
-rw-r--r--src/binder/inc/stringlexer.inl2
6 files changed, 3 insertions, 23 deletions
diff --git a/src/binder/applicationcontext.cpp b/src/binder/applicationcontext.cpp
index dc7b9ad6e3..f768ab9686 100644
--- a/src/binder/applicationcontext.cpp
+++ b/src/binder/applicationcontext.cpp
@@ -144,8 +144,6 @@ namespace BINDER_SPACE
m_pFailureCache = pFailureCache;
}
-
- m_fCanExplicitlyBindToNativeImages = false;
Exit:
BINDER_LOG_LEAVE_HR(W("ApplicationContext::Init"), hr);
diff --git a/src/binder/clrprivbinderassemblyloadcontext.cpp b/src/binder/clrprivbinderassemblyloadcontext.cpp
index 03819b8bf9..168111560f 100644
--- a/src/binder/clrprivbinderassemblyloadcontext.cpp
+++ b/src/binder/clrprivbinderassemblyloadcontext.cpp
@@ -216,10 +216,7 @@ HRESULT CLRPrivBinderAssemblyLoadContext::SetupContext(DWORD dwAppDomainId,
{
// Save the reference to the AppDomain in which the binder lives
pBinder->m_appContext.SetAppDomainId(dwAppDomainId);
-
- // Mark that this binder can explicitly bind to native images
- pBinder->m_appContext.SetExplicitBindToNativeImages(true);
-
+
// Save reference to the TPABinder that is required to be present.
_ASSERTE(pTPABinder != NULL);
pBinder->m_pTPABinder = pTPABinder;
diff --git a/src/binder/inc/applicationcontext.hpp b/src/binder/inc/applicationcontext.hpp
index cd1a2455e4..83893f33ce 100644
--- a/src/binder/inc/applicationcontext.hpp
+++ b/src/binder/inc/applicationcontext.hpp
@@ -173,19 +173,6 @@ namespace BINDER_SPACE
SimpleNameToFileNameMap * m_pTrustedPlatformAssemblyMap;
TpaFileNameHash * m_pFileNameHash;
-
- bool m_fCanExplicitlyBindToNativeImages;
-public:
- inline void SetExplicitBindToNativeImages(bool fCanExplicitlyBindToNativeImages)
- {
- m_fCanExplicitlyBindToNativeImages = fCanExplicitlyBindToNativeImages;
- }
-
- inline bool CanExplicitlyBindToNativeImages()
- {
- return m_fCanExplicitlyBindToNativeImages;
- }
-protected:
};
#include "applicationcontext.inl"
diff --git a/src/binder/inc/assemblyidentity.hpp b/src/binder/inc/assemblyidentity.hpp
index 4d7c7f1bac..16a448448b 100644
--- a/src/binder/inc/assemblyidentity.hpp
+++ b/src/binder/inc/assemblyidentity.hpp
@@ -40,7 +40,7 @@ namespace BINDER_SPACE
IDENTITY_FLAG_CONTENT_TYPE = 0x800,
IDENTITY_FLAG_FULL_NAME = (IDENTITY_FLAG_SIMPLE_NAME |
IDENTITY_FLAG_VERSION)
- } IdentityFlags;
+ };
AssemblyIdentity()
{
diff --git a/src/binder/inc/fusionassemblyname.hpp b/src/binder/inc/fusionassemblyname.hpp
index f0f69d3274..fcfea95eaf 100644
--- a/src/binder/inc/fusionassemblyname.hpp
+++ b/src/binder/inc/fusionassemblyname.hpp
@@ -52,8 +52,6 @@ private:
LPWSTR _pwzTextualIdentity;
LPWSTR _pwzTextualIdentityILFull;
- DWORD _dw;
-
public:
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid,void ** ppv);
diff --git a/src/binder/inc/stringlexer.inl b/src/binder/inc/stringlexer.inl
index f8bc3816a4..a3954bd62e 100644
--- a/src/binder/inc/stringlexer.inl
+++ b/src/binder/inc/stringlexer.inl
@@ -129,7 +129,7 @@ WCHAR StringLexer::DecodeUTF16Character()
// See http://www.ietf.org/rfc/rfc2781.txt for details on UTF-16 encoding.
WCHAR wcCurrentChar = 0;
- SIZE_T nCharacters = m_end - m_cursor + 1;
+ SCOUNT_T nCharacters = m_end - m_cursor + 1;
WCHAR wcChar1 = GetRawCharacter();
if (wcChar1 < 0xd800)