Frkaya/gccfix07102019 (dotnet/coreclr#25624)
authorSinan Kaya <41809318+franksinankaya@users.noreply.github.com>
Fri, 12 Jul 2019 19:45:28 +0000 (15:45 -0400)
committerJan Vorlicek <janvorli@microsoft.com>
Fri, 12 Jul 2019 19:45:28 +0000 (21:45 +0200)
* Remove duplicate definition

* Fix conversion error

* 1ui64 doesn't exist on GCC

Commit migrated from https://github.com/dotnet/coreclr/commit/41d0619707a29b910b7d8056a3b5d4423fc928d2

src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
src/coreclr/src/vm/eventpipe.cpp
src/coreclr/src/vm/eventpipesession.h
src/coreclr/src/vm/profilinghelper.h

index d7d7ab0..00b9d1a 100644 (file)
@@ -4366,7 +4366,7 @@ void MethodContext::recGetFieldType(CORINFO_FIELD_HANDLE  field,
         // class handle (we use only 'field' and 'memberParent' as keys).
         // Update the value in that case.
         unsigned index = GetFieldType->GetIndex(key);
-        if ((index != -1) && (GetFieldType->GetItem(index).A == 0))
+        if ((index != (unsigned)-1) && (GetFieldType->GetItem(index).A == 0))
         {
             GetFieldType->Update(index, value);
             DEBUG_REC(dmpGetFieldType(key, value));
index e35d121..7eab2c8 100644 (file)
@@ -614,7 +614,7 @@ void EventPipe::WriteEventInternal(
     {
         for (uint32_t i = 0; i < MaxNumberOfSessions; ++i)
         {
-            if ((s_allowWrite & (1ui64 << i)) == 0)
+            if ((s_allowWrite & ((uint64_t)1 << i)) == 0)
                 continue;
 
             // Now that we know this session is probably live we pay the perf cost of the memory barriers
index 31e9547..47d4040 100644 (file)
@@ -112,7 +112,7 @@ public:
     uint64_t GetMask() const
     {
         LIMITED_METHOD_CONTRACT;
-        return (1ui64 << m_index);
+        return ((uint64_t)1 << m_index);
     }
 
     uint32_t GetIndex() const
index 2f01740..ee5f60a 100644 (file)
@@ -140,7 +140,7 @@ private:
     ProfilingAPIUtility() {}
 
     static HRESULT PerformDeferredInit();
-    static HRESULT ProfilingAPIUtility::DoPreInitialization(
+    static HRESULT DoPreInitialization(
         EEToProfInterfaceImpl *pEEProf,
         const CLSID *pClsid, 
         LPCWSTR wszClsid,