[Build] Fix latest MSVC and CLang compiler errors (#1008)
* Explicit cast specification * Explicit cast specification * Suppress -Wno-tautological-compare in Clang 10 and above https://reviews.llvm.org/rG8b0d14a8f0cc085afa2a9c86c237da81c74517fc * Explicit cast specification * Add HAVE_STDINT_H compiler flag * Explicit casting mechanism type specification * typo
This commit is contained in:
parent
cac80584a0
commit
c61735130d
@ -231,6 +231,8 @@ class AMXXConfig(object):
|
||||
cxx.cflags += ['-Wno-address-of-packed-member']
|
||||
if have_clang:
|
||||
cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch']
|
||||
if cxx.version >= '10.0':
|
||||
cxx.cxxflags += ['-Wno-tautological-compare']
|
||||
if cxx.version >= 'apple-clang-10.0':
|
||||
cxx.cxxflags += [
|
||||
'-Wno-inconsistent-missing-override',
|
||||
|
@ -1434,7 +1434,7 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
||||
pPlayer->vgui = false;
|
||||
|
||||
if (time == -1)
|
||||
pPlayer->menuexpire = INFINITE;
|
||||
pPlayer->menuexpire = static_cast<float>(INFINITE);
|
||||
else
|
||||
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
||||
|
||||
@ -1452,7 +1452,7 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */
|
||||
pPlayer->vgui = false;
|
||||
|
||||
if (time == -1)
|
||||
pPlayer->menuexpire = INFINITE;
|
||||
pPlayer->menuexpire = static_cast<float>(INFINITE);
|
||||
else
|
||||
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
||||
|
||||
|
@ -930,7 +930,7 @@ static cell AMX_NATIVE_CALL menu_display(AMX *amx, cell *params)
|
||||
time = params[4];
|
||||
|
||||
if (time < 0)
|
||||
pPlayer->menuexpire = INFINITE;
|
||||
pPlayer->menuexpire = static_cast<float>(INFINITE);
|
||||
else
|
||||
pPlayer->menuexpire = gpGlobals->time + static_cast<float>(time);
|
||||
|
||||
|
@ -3,6 +3,10 @@ import os.path
|
||||
|
||||
binary = AMXX.MetaModule(builder, 'csx')
|
||||
|
||||
binary.compiler.defines += [
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
binary.sources = [
|
||||
'../../../public/sdk/amxxmodule.cpp',
|
||||
'CRank.cpp',
|
||||
|
@ -3,6 +3,10 @@ import os.path
|
||||
|
||||
binary = AMXX.MetaModule(builder, 'dodfun')
|
||||
|
||||
binary.compiler.defines += [
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
binary.sources = [
|
||||
'../../../public/sdk/amxxmodule.cpp',
|
||||
'NBase.cpp',
|
||||
|
@ -3,6 +3,10 @@ import os.path
|
||||
|
||||
binary = AMXX.MetaModule(builder, 'dodx')
|
||||
|
||||
binary.compiler.defines += [
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
binary.sources = [
|
||||
'../../../public/sdk/amxxmodule.cpp',
|
||||
'CRank.cpp',
|
||||
|
@ -3,6 +3,10 @@ import os.path
|
||||
|
||||
binary = AMXX.MetaModule(builder, 'fun')
|
||||
|
||||
binary.compiler.defines += [
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
binary.sources = [
|
||||
'../../public/sdk/amxxmodule.cpp',
|
||||
'../../public/memtools/MemoryUtils.cpp',
|
||||
|
@ -3,6 +3,10 @@ import os.path
|
||||
|
||||
binary = AMXX.MetaModule(builder, 'tfcx')
|
||||
|
||||
binary.compiler.defines += [
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
binary.sources = [
|
||||
'../../public/sdk/amxxmodule.cpp',
|
||||
'CRank.cpp',
|
||||
|
@ -3,6 +3,10 @@ import os.path
|
||||
|
||||
binary = AMXX.MetaModule(builder, 'tsfun')
|
||||
|
||||
binary.compiler.defines += [
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
binary.sources = [
|
||||
'../../../public/sdk/amxxmodule.cpp',
|
||||
]
|
||||
|
@ -3,6 +3,10 @@ import os.path
|
||||
|
||||
binary = AMXX.MetaModule(builder, 'tsx')
|
||||
|
||||
binary.compiler.defines += [
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
binary.sources = [
|
||||
'../../../public/sdk/amxxmodule.cpp',
|
||||
'CMisc.cpp',
|
||||
|
4
third_party/sqlite/sqlite3.c
vendored
4
third_party/sqlite/sqlite3.c
vendored
@ -110245,9 +110245,9 @@ static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
|
||||
** handle the rounding directly,
|
||||
** otherwise use printf.
|
||||
*/
|
||||
if( n==0 && r>=0 && r<LARGEST_INT64-1 ){
|
||||
if( n==0 && r>=0 && r< (double)(LARGEST_INT64) -1 ){
|
||||
r = (double)((sqlite_int64)(r+0.5));
|
||||
}else if( n==0 && r<0 && (-r)<LARGEST_INT64-1 ){
|
||||
}else if( n==0 && r<0 && (-r)< (double)(LARGEST_INT64) -1 ){
|
||||
r = -(double)((sqlite_int64)((-r)+0.5));
|
||||
}else{
|
||||
zBuf = sqlite3_mprintf("%.*f",n,r);
|
||||
|
Loading…
Reference in New Issue
Block a user