Changed: #825 Remove all warnings when compiling Ryzom

This commit is contained in:
kervala 2011-03-10 23:22:27 +01:00
parent 7e542e0201
commit a221b39585
5 changed files with 13 additions and 23 deletions

View file

@ -35,15 +35,9 @@ class IStream;
//------------------ DDS STUFFS -------------------- //------------------ DDS STUFFS --------------------
#ifndef NL_MAKEFOURCC #ifndef NL_MAKEFOURCC
#ifdef NL_LITTLE_ENDIAN #define NL_MAKEFOURCC(ch0, ch1, ch2, ch3) \
#define NL_MAKEFOURCC(ch0, ch1, ch2, ch3) \ ((uint32)(uint8)(ch0) | ((uint32)(uint8)(ch1) << 8) | \
((uint32)(uint8)(ch0) | ((uint32)(uint8)(ch1) << 8) | \ ((uint32)(uint8)(ch2) << 16) | ((uint32)(uint8)(ch3) << 24 ))
((uint32)(uint8)(ch2) << 16) | ((uint32)(uint8)(ch3) << 24 ))
#else
#define NL_MAKEFOURCC(ch0, ch1, ch2, ch3) \
((uint32)(uint8)(ch3) | ((uint32)(uint8)(ch2) << 8) | \
((uint32)(uint8)(ch1) << 16) | ((uint32)(uint8)(ch0) << 24 ))
#endif
#endif #endif
const uint32 DDS_HEADER = NL_MAKEFOURCC('D', 'D', 'S', ' '); const uint32 DDS_HEADER = NL_MAKEFOURCC('D', 'D', 'S', ' ');

View file

@ -2537,7 +2537,7 @@ bool CDriverGL::isActive()
XWindowAttributes attr; XWindowAttributes attr;
Status status = XGetWindowAttributes(_dpy, _win, &attr); Status status = XGetWindowAttributes(_dpy, _win, &attr);
nlwarning("XGetWindowAttributes returned %d", status); res = (status == 1);
#endif // NL_OS_UNIX #endif // NL_OS_UNIX

View file

@ -173,7 +173,7 @@ uint32 CBackupInterfaceSingleton::pushGenericAckCallback(NLMISC::CSmartPtr<IBack
++_Counter; ++_Counter;
if (!_GenericResponses.empty()) if (!_GenericResponses.empty())
{ {
nlassert(((sint32)_GenericResponses.front().first-(sint32)requestId)<0); nlassert(_GenericResponses.front().first<requestId);
} }
// if we have no callback then just return the generated request Id... // if we have no callback then just return the generated request Id...

View file

@ -214,9 +214,7 @@ namespace EFFECT_FAMILIES
case DMGTYPE::POISON : return DebuffResistPoison; case DMGTYPE::POISON : return DebuffResistPoison;
case DMGTYPE::ELECTRICITY : return DebuffResistElectricity; case DMGTYPE::ELECTRICITY : return DebuffResistElectricity;
case DMGTYPE::SHOCK : return DebuffResistSchock; case DMGTYPE::SHOCK : return DebuffResistSchock;
default: default: break;
return Unknown;
break;
} }
return Unknown; return Unknown;
} }
@ -232,9 +230,7 @@ namespace EFFECT_FAMILIES
case DMGTYPE::POISON : return CombatDoTPoison; case DMGTYPE::POISON : return CombatDoTPoison;
case DMGTYPE::ELECTRICITY : return CombatDoTElectricity; case DMGTYPE::ELECTRICITY : return CombatDoTElectricity;
case DMGTYPE::SHOCK : return CombatDoTShock; case DMGTYPE::SHOCK : return CombatDoTShock;
default: default: break;
return Unknown;
break;
} }
return Unknown; return Unknown;
} }

View file

@ -836,9 +836,9 @@ bool CScenarioValidator::setScenarioToLoad( const std::string& filename, CScenar
static const char * slashheader = "---- /Header\n\n"; static const char * slashheader = "---- /Header\n\n";
static const char * comment = "-- "; static const char * comment = "-- ";
static const unsigned int headerLen = (unsigned int)strlen(header); static const uint headerLen = (uint)strlen(header);
static const unsigned int slasheaderLen = (unsigned int)strlen(slashheader); static const uint slasheaderLen = (uint)strlen(slashheader);
static const unsigned int commentLen = (unsigned int)strlen(comment); static const uint commentLen = (uint)strlen(comment);
NLMISC::CSString tmp; NLMISC::CSString tmp;
@ -1095,9 +1095,9 @@ bool CUserComponentValidator::setUserComponentToLoad( const std::string& filenam
static const char * slashheader = "---- /Header\n\n"; static const char * slashheader = "---- /Header\n\n";
static const char * comment = "-- "; static const char * comment = "-- ";
static const unsigned int headerLen = (unsigned int)strlen(header); static const uint headerLen = (uint)strlen(header);
static const unsigned int slasheaderLen = (unsigned int)strlen(slashheader); static const uint slasheaderLen = (uint)strlen(slashheader);
static const unsigned int commentLen = (unsigned int)strlen(comment); static const uint commentLen = (uint)strlen(comment);
NLMISC::CSString tmp; NLMISC::CSString tmp;