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)
|
if (!passPhrase)
|
||||||
throw Exception("Null 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))
|
if (SecurityCode != encode(passPhrase))
|
||||||
throw Exception("Check not passed");
|
throw Exception("Check not passed");
|
||||||
|
|
|
@ -61,9 +61,9 @@ public:
|
||||||
/// Set cookie
|
/// 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
|
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
|
/// Return the security code
|
||||||
CSecurityCode encode(char *passPhrase);
|
CSecurityCode encode(const char *passPhrase);
|
||||||
/// Check the security code
|
/// Check the security code
|
||||||
void check(char *passPhrase);
|
void check(const char *passPhrase);
|
||||||
|
|
||||||
/// Read some data from stream
|
/// Read some data from stream
|
||||||
void receiveSecurityCode(NLMISC::IStream& msgin);
|
void receiveSecurityCode(NLMISC::IStream& msgin);
|
||||||
|
|
|
@ -1270,7 +1270,7 @@ bool forageTestDoExtract(
|
||||||
testSource->extractMaterial( req, abs, ForageQualityCeilingFactor.get(), ForageQualitySlowFactor.get(), res, successFactor, 0, row, propDrop );
|
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",
|
fprintf( f, "%g;%g;%g;%g;%g;%g;%g;%g;%g;%u;%u;\n",
|
||||||
res[CHarvestSource::A], res[CHarvestSource::Q],
|
res[CHarvestSource::A], res[CHarvestSource::Q],
|
||||||
testSource->getD(), testSource->getE(), 0 /*testSource->getC()*/,
|
testSource->getD(), testSource->getE(), 0.f /*testSource->getC()*/,
|
||||||
reqS, reqA, reqQ,
|
reqS, reqA, reqQ,
|
||||||
testSource->quantity(), testSource->getImpactScheme()*5, 127 );
|
testSource->quantity(), testSource->getImpactScheme()*5, 127 );
|
||||||
if ( (!eventD) && (testSource->getD() > 127) )
|
if ( (!eventD) && (testSource->getD() > 127) )
|
||||||
|
|
|
@ -1936,7 +1936,7 @@ void CDepositMapsBatchTask::run()
|
||||||
CSString res;
|
CSString res;
|
||||||
disp.write( res );
|
disp.write( res );
|
||||||
res = res.replace( "\n", "<BR>\n" );
|
res = res.replace( "\n", "<BR>\n" );
|
||||||
fprintf( outputF, res.c_str() );
|
fprintf( outputF, "%s", res.c_str() );
|
||||||
|
|
||||||
// Close files
|
// Close files
|
||||||
fclose( inputF );
|
fclose( inputF );
|
||||||
|
|
|
@ -22,13 +22,17 @@ class CEntityState;
|
||||||
class COfflineEntityState;
|
class COfflineEntityState;
|
||||||
class CCharacterRespawnPoints;
|
class CCharacterRespawnPoints;
|
||||||
class CFarPosition;
|
class CFarPosition;
|
||||||
class NLNET::CMessage;
|
|
||||||
class CModuleParent;
|
class CModuleParent;
|
||||||
|
|
||||||
|
namespace NLNET
|
||||||
|
{
|
||||||
|
class CMessage;
|
||||||
|
}
|
||||||
|
|
||||||
namespace R2
|
namespace R2
|
||||||
{
|
{
|
||||||
struct TUserRole;
|
struct TUserRole;
|
||||||
};
|
}
|
||||||
|
|
||||||
class CRingRewardPoints;
|
class CRingRewardPoints;
|
||||||
|
|
||||||
|
|
|
@ -1187,9 +1187,14 @@ bool CNameManager::loadForbiddenNames()
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
char str[512];
|
char str[512];
|
||||||
fgets(str, 511, fp);
|
char *fgres = fgets(str, 511, fp);
|
||||||
if(feof(fp))
|
if(feof(fp))
|
||||||
break;
|
break;
|
||||||
|
if (fgres == NULL)
|
||||||
|
{
|
||||||
|
nlwarning("NAMEMGR: Error reading file");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (strlen(str) > 0)
|
if (strlen(str) > 0)
|
||||||
{
|
{
|
||||||
str[strlen(str)-1] = '\0';
|
str[strlen(str)-1] = '\0';
|
||||||
|
|
|
@ -208,7 +208,7 @@ namespace RSMGR
|
||||||
public:
|
public:
|
||||||
CRingSessionManager()
|
CRingSessionManager()
|
||||||
: _DontUsePerm(false),
|
: _DontUsePerm(false),
|
||||||
_CharSync(false)
|
_CharSync(NULL)
|
||||||
{
|
{
|
||||||
CRingSessionManagerSkel::init(this);
|
CRingSessionManagerSkel::init(this);
|
||||||
CWelcomeServiceClientSkel::init(this);
|
CWelcomeServiceClientSkel::init(this);
|
||||||
|
|
Loading…
Reference in a new issue