Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gcc 12.1 compilation #1056

Merged
merged 1 commit into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/cstrike/csx/CMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ void CPlayer::Connect(const char* address ){

void CPlayer::restartStats(bool all)
{
if ( all ) memset(weapons,0,sizeof(weapons));
memset(weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
memset(attackers,0,sizeof(attackers));
memset(victims,0,sizeof(victims));
if ( all ) memset(&weapons,0,sizeof(weapons));
memset(&weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
memset(&attackers,0,sizeof(attackers));
memset(&victims,0,sizeof(victims));
life = {};
}

Expand Down
10 changes: 5 additions & 5 deletions modules/dod/dodx/CMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ void CPlayer::restartStats(bool all)
{
if ( all )
{
memset(weapons,0,sizeof(weapons));
memset(&weapons,0,sizeof(weapons));
memset(static_cast<void *>(&round),0,sizeof(round));
memset(weaponsRnd,0,sizeof(weaponsRnd));
memset(&weaponsRnd,0,sizeof(weaponsRnd));
}

memset(weaponsLife,0,sizeof(weaponsLife)); //DEC-Weapon (Round) stats
memset(attackers,0,sizeof(attackers));
memset(victims,0,sizeof(victims));
memset(&weaponsLife,0,sizeof(weaponsLife)); //DEC-Weapon (Round) stats
memset(&attackers,0,sizeof(attackers));
memset(&victims,0,sizeof(victims));
life = {};
}

Expand Down
2 changes: 1 addition & 1 deletion modules/dod/dodx/moduleconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void PlayerPreThink_Post(edict_t *pEntity)
{
pPlayer->clearRound = 0.0f;
memset(static_cast<void *>(&pPlayer->round),0,sizeof(pPlayer->round));
memset(pPlayer->weaponsRnd,0,sizeof(pPlayer->weaponsRnd));
memset(&pPlayer->weaponsRnd,0,sizeof(pPlayer->weaponsRnd));
}

if (pPlayer->sendScore && pPlayer->sendScore < gpGlobals->time)
Expand Down
6 changes: 3 additions & 3 deletions modules/mysqlx/AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ if AMXX.mysql_path:

binary.sources = []

if builder.target_platform is 'linux' or builder.target_platform is 'mac':
if builder.target_platform == 'linux' or builder.target_platform == 'mac':
binary.compiler.defines += ['stricmp=strcasecmp']
binary.compiler.linkflags += [
os.path.join(AMXX.mysql_path, 'lib', 'libmysqlclient_r.a'),
'-lpthread',
'-lm',
]
if builder.target_platform is 'linux':
if builder.target_platform == 'linux':
binary.compiler.linkflags += [
'-lrt'
]
elif builder.target_platform is 'windows':
elif builder.target_platform == 'windows':
binary.compiler.linkflags += [
os.path.join(AMXX.mysql_path, 'lib', 'mysqlclient.lib'),
'ws2_32.lib',
Expand Down
2 changes: 1 addition & 1 deletion modules/sqlite/AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ binary.compiler.defines += [
'HAVE_STDINT_H',
]

if builder.target_platform is 'linux' or builder.target_platform is 'mac':
if builder.target_platform == 'linux' or builder.target_platform == 'mac':
binary.compiler.defines += ['stricmp=strcasecmp']
binary.compiler.postlink += ['-lpthread']

Expand Down
8 changes: 4 additions & 4 deletions modules/tfcx/CMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ void CPlayer::Connect(const char* address ){

void CPlayer::restartStats(bool all)
{
if ( all ) memset(weapons,0,sizeof(weapons));
memset(weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
memset(attackers,0,sizeof(attackers));
memset(victims,0,sizeof(victims));
if ( all ) memset(&weapons,0,sizeof(weapons));
memset(&weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
memset(&attackers,0,sizeof(attackers));
memset(&victims,0,sizeof(victims));
life = {};
}

Expand Down
8 changes: 4 additions & 4 deletions modules/ts/tsx/CMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ void CPlayer::Connect(const char* ippp)

void CPlayer::restartStats(bool all)
{
if ( all ) memset(weapons,0,sizeof(weapons));
memset(weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
memset(attackers,0,sizeof(attackers));
memset(victims,0,sizeof(victims));
if ( all ) memset(&weapons,0,sizeof(weapons));
memset(&weaponsRnd,0,sizeof(weaponsRnd)); //DEC-Weapon (Round) stats
memset(&attackers,0,sizeof(attackers));
memset(&victims,0,sizeof(victims));
life = {};
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/zlib/AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import os, platform

lib = builder.compiler.StaticLibrary('zlib')

if builder.target_platform is 'linux' or builder.target_platform is 'mac':
if builder.target_platform == 'linux' or builder.target_platform == 'mac':
lib.compiler.defines += [
'HAVE_UNISTD_H'
]
Expand Down