Fixed warnings that only appeared when compiling amd64 binaries

This commit is contained in:
Scott Ehlert 2006-08-27 04:50:20 +00:00
parent 22bef17660
commit 709b3705ab
5 changed files with 547 additions and 549 deletions

View File

@ -24,7 +24,7 @@
#define AMX_NODYNALOAD #define AMX_NODYNALOAD
#define AMX_ANSIONLY #define AMX_ANSIONLY
#if BUILD_PLATFORM == WINDOWS && BUILD_TYPE == RELEASE && BUILD_COMPILER == MSVC && PAWN_CELL_SIZE == 64 #if !defined __linux__ && BUILD_PLATFORM == WINDOWS && BUILD_TYPE == RELEASE && BUILD_COMPILER == MSVC && PAWN_CELL_SIZE == 64
/* bad bad workaround but we have to prevent a compiler crash :/ */ /* bad bad workaround but we have to prevent a compiler crash :/ */
#pragma optimize("g",off) #pragma optimize("g",off)
#endif #endif

View File

@ -585,8 +585,6 @@ int set_amxnatives(AMX* amx, char error[128])
int unload_amxscript(AMX* amx, void** program) int unload_amxscript(AMX* amx, void** program)
{ {
int flags = amx->flags;
Debugger *pDebugger = (Debugger *)amx->userdata[UD_DEBUGGER]; Debugger *pDebugger = (Debugger *)amx->userdata[UD_DEBUGGER];
if (pDebugger) if (pDebugger)
delete pDebugger; delete pDebugger;

View File

@ -146,7 +146,7 @@ int sqlite3_get_table(
rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg); rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
if( res.azResult ){ if( res.azResult ){
assert( sizeof(res.azResult[0])>= sizeof(res.nData) ); assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
res.azResult[0] = (char*)res.nData; res.azResult[0] = (void *)(long)res.nData;
} }
if( rc==SQLITE_ABORT ){ if( rc==SQLITE_ABORT ){
sqlite3_free_table(&res.azResult[1]); sqlite3_free_table(&res.azResult[1]);
@ -191,7 +191,7 @@ void sqlite3_free_table(
int i, n; int i, n;
azResult--; azResult--;
if( azResult==0 ) return; if( azResult==0 ) return;
n = (int)azResult[0]; n = (int)(long)azResult[0];
for(i=1; i<n; i++){ if( azResult[i] ) free(azResult[i]); } for(i=1; i<n; i++){ if( azResult[i] ) free(azResult[i]); }
free(azResult); free(azResult);
} }

View File

@ -776,7 +776,7 @@ const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
pVal->flags |= (pVal->flags & MEM_Blob)>>3; pVal->flags |= (pVal->flags & MEM_Blob)>>3;
if( pVal->flags&MEM_Str ){ if( pVal->flags&MEM_Str ){
sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED); sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&(int)pVal->z) ){ if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&(long)pVal->z) ){
assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 ); assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){ if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
return 0; return 0;

View File

@ -28,8 +28,8 @@ inline void MESSAGE_BEGIN( int msg_dest, int msg_type, const float *pOrigin, ent
extern globalvars_t *gpGlobals; extern globalvars_t *gpGlobals;
// Use this instead of ALLOC_STRING on constant strings // Use this instead of ALLOC_STRING on constant strings
#define STRING(offset) reinterpret_cast<const char *>(gpGlobals->pStringBase + (int)offset) #define STRING(offset) reinterpret_cast<const char *>(gpGlobals->pStringBase + (uintp)offset)
#define MAKE_STRING(str) ((int)str - (int)STRING(0)) #define MAKE_STRING(str) (reinterpret_cast<uintp>(str) - reinterpret_cast<uintp>(STRING(0)))
inline edict_t *FIND_ENTITY_BY_CLASSNAME(edict_t *entStart, const char *pszName) inline edict_t *FIND_ENTITY_BY_CLASSNAME(edict_t *entStart, const char *pszName)
{ {