mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Fix warnings
This commit is contained in:
parent
85365fd7bb
commit
3b1d4e3915
7 changed files with 19 additions and 10 deletions
|
@ -43,7 +43,7 @@ void CSecurityCheckForFastDisconnection::forwardSecurityCode(NLMISC::IStream& ms
|
|||
}
|
||||
|
||||
//
|
||||
CSecurityCode CSecurityCheckForFastDisconnection::encode(char *passPhrase)
|
||||
CSecurityCode CSecurityCheckForFastDisconnection::encode(const char *passPhrase)
|
||||
{
|
||||
if (!passPhrase)
|
||||
throw Exception("Null passPhrase");
|
||||
|
@ -56,7 +56,7 @@ CSecurityCode CSecurityCheckForFastDisconnection::encode(char *passPhrase)
|
|||
}
|
||||
|
||||
//
|
||||
void CSecurityCheckForFastDisconnection::check(char *passPhrase)
|
||||
void CSecurityCheckForFastDisconnection::check(const char *passPhrase)
|
||||
{
|
||||
if (SecurityCode != encode(passPhrase))
|
||||
throw Exception("Check not passed");
|
||||
|
|
|
@ -61,9 +61,9 @@ public:
|
|||
/// Set cookie
|
||||
void setCookie(const NLNET::CLoginCookie& cookie) { Block.Cookie.set(cookie.getUserAddr(), cookie.getUserKey(), cookie.getUserId()); } // don't use the default generated bitwise assignment operator, because of padding junk that would be copied
|
||||
/// Return the security code
|
||||
CSecurityCode encode(char *passPhrase);
|
||||
CSecurityCode encode(const char *passPhrase);
|
||||
/// Check the security code
|
||||
void check(char *passPhrase);
|
||||
void check(const char *passPhrase);
|
||||
|
||||
/// Read some data from stream
|
||||
void receiveSecurityCode(NLMISC::IStream& msgin);
|
||||
|
|
|
@ -1270,7 +1270,7 @@ bool forageTestDoExtract(
|
|||
testSource->extractMaterial( req, abs, ForageQualityCeilingFactor.get(), ForageQualitySlowFactor.get(), res, successFactor, 0, row, propDrop );
|
||||
fprintf( f, "%g;%g;%g;%g;%g;%g;%g;%g;%g;%u;%u;\n",
|
||||
res[CHarvestSource::A], res[CHarvestSource::Q],
|
||||
testSource->getD(), testSource->getE(), 0 /*testSource->getC()*/,
|
||||
testSource->getD(), testSource->getE(), 0.f /*testSource->getC()*/,
|
||||
reqS, reqA, reqQ,
|
||||
testSource->quantity(), testSource->getImpactScheme()*5, 127 );
|
||||
if ( (!eventD) && (testSource->getD() > 127) )
|
||||
|
|
|
@ -1936,7 +1936,7 @@ void CDepositMapsBatchTask::run()
|
|||
CSString res;
|
||||
disp.write( res );
|
||||
res = res.replace( "\n", "<BR>\n" );
|
||||
fprintf( outputF, res.c_str() );
|
||||
fprintf( outputF, "%s", res.c_str() );
|
||||
|
||||
// Close files
|
||||
fclose( inputF );
|
||||
|
|
|
@ -22,13 +22,17 @@ class CEntityState;
|
|||
class COfflineEntityState;
|
||||
class CCharacterRespawnPoints;
|
||||
class CFarPosition;
|
||||
class NLNET::CMessage;
|
||||
class CModuleParent;
|
||||
|
||||
namespace NLNET
|
||||
{
|
||||
class CMessage;
|
||||
}
|
||||
|
||||
namespace R2
|
||||
{
|
||||
struct TUserRole;
|
||||
};
|
||||
}
|
||||
|
||||
class CRingRewardPoints;
|
||||
|
||||
|
|
|
@ -1187,9 +1187,14 @@ bool CNameManager::loadForbiddenNames()
|
|||
while (true)
|
||||
{
|
||||
char str[512];
|
||||
fgets(str, 511, fp);
|
||||
char *fgres = fgets(str, 511, fp);
|
||||
if(feof(fp))
|
||||
break;
|
||||
if (fgres == NULL)
|
||||
{
|
||||
nlwarning("NAMEMGR: Error reading file");
|
||||
break;
|
||||
}
|
||||
if (strlen(str) > 0)
|
||||
{
|
||||
str[strlen(str)-1] = '\0';
|
||||
|
|
|
@ -208,7 +208,7 @@ namespace RSMGR
|
|||
public:
|
||||
CRingSessionManager()
|
||||
: _DontUsePerm(false),
|
||||
_CharSync(false)
|
||||
_CharSync(NULL)
|
||||
{
|
||||
CRingSessionManagerSkel::init(this);
|
||||
CWelcomeServiceClientSkel::init(this);
|
||||
|
|
Loading…
Reference in a new issue