Fixed: clang warnings

--HG--
branch : develop
This commit is contained in:
kervala 2015-11-06 15:24:19 +01:00
parent 94b7148d44
commit 93a03b5db0
6 changed files with 11 additions and 9 deletions

View file

@ -366,7 +366,7 @@ namespace NLGUI
bool _Connecting;
double _TimeoutValue; // the timeout in seconds
double _ConnectingTimeout;
uint32 _RedirectsRemaining;
sint _RedirectsRemaining;
// minimal embeded lua script support
// Note : any embeded script is executed immediately after the closing

View file

@ -49,7 +49,7 @@ void xmlCheckNodeName (xmlNodePtr &node, const char *nodeName)
// Make an error message
char tmp[512];
smprintf (tmp, 512, "LogicStateMachine STATE_MACHINE XML Syntax error in block line %d, node %s should be %s",
(int)node->line, node->name, nodeName);
node ? (int)node->line:-1, node->name, nodeName);
nlinfo (tmp);
nlstop;

View file

@ -700,6 +700,9 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m
# endif
abort();
break;
default:
break;
}
// no more sent mail for crash

View file

@ -784,7 +784,7 @@ bool NLPACS::CGlobalRetriever::buildInstance(const string &id, const NLMISC::C
const CRetrieverInstance &instance = makeInstance(retrieverId, 0, CVector(position));
// check make instance success
if (&instance == NULL || instance.getInstanceId() == -1 || instance.getRetrieverId() != retrieverId)
if (instance.getInstanceId() == -1 || instance.getRetrieverId() != retrieverId)
return false;
// links new instance to its neighbors

View file

@ -396,7 +396,7 @@ bool CSkyObject::setup(const CClientDate &date, const CClientDate &animationDate
for(uint k = 0; k < SKY_MAX_NUM_STAGE; ++k)
{
if (TexPanner[k].U != 0.f || TexPanner[k].V != 0.f ||
OffsetUBitmap != NULL || OffsetVBitmap != NULL )
OffsetUBitmap[k] != NULL || OffsetVBitmap[k] != NULL )
{
//nlinfo("global date = %f", animTime);
// there's tex panning for that stage

View file

@ -425,7 +425,8 @@ inline void CCallStackSingleton::setTopStackEntry(ICallStackEntry* newEntry)
inline void CCallStackSingleton::display(NLMISC::CLog *log)
{
nlassert(log!=NULL);
getTopStackEntry()->displayStack(*log);
ICallStackEntry *entry = getTopStackEntry();
if (entry) entry->displayStack(*log);
log->displayNL("");
}
@ -468,15 +469,13 @@ inline ICallStackEntry::~ICallStackEntry()
inline void ICallStackEntry::displayStack(NLMISC::CLog& log) const
{
// stop recursing when we reach a NULL object
// (this is implemented in this way in order to ximplify call code)
if (this==NULL)
return;
// (this is implemented in this way in order to simplify call code)
// display this entry
displayEntry(log);
// recurse through call stack
_Next->displayStack(log);
if (_Next) _Next->displayStack(log);
}