Fix clang compile

This commit is contained in:
JusicP
2021-04-28 18:24:16 +03:00
parent c70e496e72
commit d349b1769a
15 changed files with 65 additions and 47 deletions
+2 -2
View File
@@ -849,7 +849,7 @@ void bf_read::SetDebugName( const char *pName )
m_pDebugName = pName;
}
void bf_read::SetOverflowFlag()
void bf_read::SetOverflowFlag() RESTRICT
{
if ( m_bAssertOnOverflow )
{
@@ -992,7 +992,7 @@ unsigned int bf_read::PeekUBitLong( int numbits )
return r;
}
unsigned int bf_read::ReadUBitLongNoInline( int numbits )
unsigned int bf_read::ReadUBitLongNoInline( int numbits ) RESTRICT
{
return ReadUBitLong( numbits );
}
+4 -4
View File
@@ -1421,7 +1421,7 @@ int _V_UCS2ToUnicode( const ucs2 *pUCS2, wchar_t *pUnicode, int cubDestSizeInByt
size_t nMaxUTF8 = cubDestSizeInBytes;
char *pIn = (char *)pUCS2;
char *pOut = (char *)pUnicode;
if ( conv_t > 0 )
if ( conv_t > (void*)0 )
{
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUTF8 );
iconv_close( conv_t );
@@ -1461,7 +1461,7 @@ int _V_UnicodeToUCS2( const wchar_t *pUnicode, int cubSrcInBytes, char *pUCS2, i
size_t nMaxUCS2 = cubDestSizeInBytes;
char *pIn = (char*)pUnicode;
char *pOut = pUCS2;
if ( conv_t > 0 )
if ( conv_t > (void*)0 )
{
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUCS2 );
iconv_close( conv_t );
@@ -1509,7 +1509,7 @@ int _V_UCS2ToUTF8( const ucs2 *pUCS2, char *pUTF8, int cubDestSizeInBytes )
size_t nMaxUTF8 = cubDestSizeInBytes - 1;
char *pIn = (char *)pUCS2;
char *pOut = (char *)pUTF8;
if ( conv_t > 0 )
if ( conv_t > (void*)0 )
{
const size_t nBytesToWrite = nMaxUTF8;
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUTF8 );
@@ -1554,7 +1554,7 @@ int _V_UTF8ToUCS2( const char *pUTF8, int cubSrcInBytes, ucs2 *pUCS2, int cubDes
size_t nMaxUTF8 = cubDestSizeInBytes;
char *pIn = (char *)pUTF8;
char *pOut = (char *)pUCS2;
if ( conv_t > 0 )
if ( conv_t > (void*)0 )
{
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUTF8 );
iconv_close( conv_t );