Added detection for clang compiler and fixed various warnings triggered by it (bug 4878, r=dvander).
This commit is contained in:
@@ -103,7 +103,7 @@ CallConvention CallWrapper::GetCallConvention()
|
||||
|
||||
const PassEncode *CallWrapper::GetParamInfo(unsigned int num)
|
||||
{
|
||||
if (num + 1 > GetParamCount() || num < 0)
|
||||
if (num + 1 > GetParamCount())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ SourceHook::ProtoInfo::CallConvention CallWrapper::GetSHCallConvention()
|
||||
|
||||
const SourceHook::PassInfo * CallWrapper::GetSHParamInfo(unsigned int num)
|
||||
{
|
||||
if (num + 1 > GetParamCount() || num < 0)
|
||||
if (num + 1 > GetParamCount())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ IResultRow *MyBoundResults::FetchRow()
|
||||
{
|
||||
if (mysql_stmt_bind_result(m_stmt, m_bind) != 0)
|
||||
{
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
m_bUpdatedBinds = false;
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ for i in SM.sdkInfo:
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit', 'x86'))
|
||||
|
||||
if compiler.cc.name == 'gcc':
|
||||
compiler['CFLAGS'].append('-Wno-parentheses')
|
||||
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
|
||||
compiler['CFLAGS'].append('-Wno-parentheses')
|
||||
|
||||
if i != 'ep1':
|
||||
compiler['CDEFINES'].append('HOOKING_ENABLED')
|
||||
|
||||
@@ -167,7 +167,7 @@ IDatabase *SqDriver::Connect(const DatabaseInfo *info, bool persistent, char *er
|
||||
|
||||
/* Chop any filename off */
|
||||
for (size_t i = len-1;
|
||||
i >= 0 && i <= len-1;
|
||||
i <= len-1;
|
||||
i--)
|
||||
{
|
||||
if (IsPathSepChar(path[i]))
|
||||
|
||||
@@ -3,7 +3,7 @@ import os
|
||||
|
||||
sdk = SM.sdkInfo['ep2v']
|
||||
compiler = SM.DefaultHL2Compiler('extensions/tf2', 'ep2v')
|
||||
if compiler.cc.name == 'gcc':
|
||||
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
|
||||
compiler['CFLAGS'].append('-Wno-parentheses')
|
||||
|
||||
name = 'game.tf2.ext.' + sdk['ext']
|
||||
|
||||
Reference in New Issue
Block a user