https://git.reactos.org/?p=reactos.git;a=commitdiff;h=48f3efa2544c33764278bc...
commit 48f3efa2544c33764278bc0c72c3d4d8671fa84c Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Mon Jun 3 09:07:36 2019 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Sat Jul 20 13:56:18 2019 +0200
[PSDK][CRT] Add some casts to make GCC 8 happy --- sdk/include/crt/comutil.h | 4 ++-- sdk/lib/atl/atlsimpcoll.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sdk/include/crt/comutil.h b/sdk/include/crt/comutil.h index 036428fab98..a929d977840 100644 --- a/sdk/include/crt/comutil.h +++ b/sdk/include/crt/comutil.h @@ -485,7 +485,7 @@ inline _variant_t::_variant_t(VARIANT &varSrc,bool fCopy) { ::VariantInit(this); _com_util::CheckError(::VariantCopy(this,&varSrc)); } else { - _COM_MEMCPY_S(this,sizeof(varSrc),&varSrc,sizeof(varSrc)); + _COM_MEMCPY_S(static_cast<void*>(this),sizeof(varSrc),&varSrc,sizeof(varSrc)); V_VT(&varSrc) = VT_EMPTY; } } @@ -1149,7 +1149,7 @@ inline void _variant_t::Attach(VARIANT &varSrc)
Clear();
- _COM_MEMCPY_S(this,sizeof(varSrc),&varSrc,sizeof(varSrc)); + _COM_MEMCPY_S(static_cast<void*>(this),sizeof(varSrc),&varSrc,sizeof(varSrc)); V_VT(&varSrc) = VT_EMPTY; }
diff --git a/sdk/lib/atl/atlsimpcoll.h b/sdk/lib/atl/atlsimpcoll.h index 3bf39c8e91c..a174378fa17 100644 --- a/sdk/lib/atl/atlsimpcoll.h +++ b/sdk/lib/atl/atlsimpcoll.h @@ -62,7 +62,7 @@ public: { // allocate extra capacity for optimization const int nNewCapacity = (m_nCount + 1) + c_nGrow; - T *pNewData = (T *)realloc(m_pData, nNewCapacity * sizeof(T)); + T *pNewData = (T *)realloc(static_cast<void *>(m_pData), nNewCapacity * sizeof(T)); if (pNewData == NULL) return FALSE; // failure
@@ -141,7 +141,7 @@ public: // move range [nIndex + 1, m_nCount) to nIndex const int nRightCount = m_nCount - (nIndex + 1); const int nRightSize = nRightCount * sizeof(T); - memmove(&m_pData[nIndex], &m_pData[nIndex + 1], nRightSize); + memmove(static_cast<void *>(&m_pData[nIndex]), &m_pData[nIndex + 1], nRightSize);
// decrement --m_nCount; @@ -184,7 +184,7 @@ public:
int nNewCount = src.GetSize();
- T *pNewData = (T *)realloc(m_pData, nNewCount * sizeof(T)); + T *pNewData = (T *)realloc(static_cast<void *>(m_pData), nNewCount * sizeof(T)); ATLASSERT(pNewData); if (pNewData == NULL) return *this; // failure