Changed: #825 Remove all warnings when compiling Ryzom

This commit is contained in:
kervala 2010-08-28 15:02:00 +02:00
parent f5c1113f58
commit 73d568da62
14 changed files with 26 additions and 26 deletions

View file

@ -95,7 +95,7 @@ int main (int argc, char **argv)
Password = fgets(buf, 256, stdin); Password = fgets(buf, 256, stdin);
} }
// crypt with md5 the password // crypt with md5 the password
CHashKeyMD5 hk = getMD5((uint8*)Password.c_str(), Password.size()); CHashKeyMD5 hk = getMD5((uint8*)Password.c_str(), (uint32)Password.size());
string CPassword = hk.toString(); string CPassword = hk.toString();
nlinfo("The crypted password is %s", CPassword.c_str()); nlinfo("The crypted password is %s", CPassword.c_str());

View file

@ -213,8 +213,8 @@ void cbInfo (CMessage &msgin, TSockId from, CCallbackNetBase &netbase)
#ifdef USE_3D #ifdef USE_3D
string token = "MeanPongTime "; string token = "MeanPongTime ";
uint pos=line.find (token); string::size_type pos=line.find (token);
uint pos2=line.find (" ", pos+token.size()); string::size_type pos2=line.find (" ", pos+token.size());
uint32 val = atoi(line.substr (pos+token.size(), pos2-pos-token.size()).c_str()); uint32 val = atoi(line.substr (pos+token.size(), pos2-pos-token.size()).c_str());
LagGraph.addOneValue ((float)val); LagGraph.addOneValue ((float)val);
#endif #endif
@ -309,7 +309,7 @@ int main( int argc, char **argv )
UTextContext *TextContext= Driver->createTextContext(CPath::lookup("n019003l.pfb")); UTextContext *TextContext= Driver->createTextContext(CPath::lookup("n019003l.pfb"));
TextContext->setFontSize(18); TextContext->setFontSize(18);
Camera.setPerspective(80*Pi/180, 1.33, 0.15, 1000); Camera.setPerspective(80*(float)Pi/180, 1.33f, 0.15f, 1000);
CEvent3dMouseListener MouseListener; CEvent3dMouseListener MouseListener;
MouseListener.addToServer(Driver->EventServer); MouseListener.addToServer(Driver->EventServer);

View file

@ -81,7 +81,7 @@ void CGraph::render (NL3D::UDriver *Driver, NL3D::UTextContext *TextContext)
CVertexBuffer vbuffer; CVertexBuffer vbuffer;
vbuffer.setVertexFormat (CVertexBuffer::PositionFlag); vbuffer.setVertexFormat (CVertexBuffer::PositionFlag);
vbuffer.setNumVertices (Values.size() * 2); vbuffer.setNumVertices ((uint32)Values.size() * 2);
float pos = X+Width-1; float pos = X+Width-1;
uint i = 0; uint i = 0;

View file

@ -264,7 +264,7 @@ int main ()
} }
// Keyboard // Keyboard
if (arrayObj.size()) if (!arrayObj.empty())
{ {
// Manipulate selected primitive // Manipulate selected primitive
keyboard (pDriver, deltaTime, *(arrayObj[selected])); keyboard (pDriver, deltaTime, *(arrayObj[selected]));
@ -273,7 +273,8 @@ int main ()
if (pDriver->AsyncListener.isKeyDown (KeyDELETE)) if (pDriver->AsyncListener.isKeyDown (KeyDELETE))
{ {
// remove all but one // remove all but one
if (arrayObj.size() > 1) { if (arrayObj.size() > 1)
{
arrayObj[arrayObj.size()-1]->remove (*container, *pScene); arrayObj[arrayObj.size()-1]->remove (*container, *pScene);
arrayObj.resize (arrayObj.size()-1); arrayObj.resize (arrayObj.size()-1);
} }
@ -281,7 +282,7 @@ int main ()
// Check selected // Check selected
if (selected>=arrayObj.size()) if (selected>=arrayObj.size())
selected=arrayObj.size()-1; selected=(uint)arrayObj.size()-1;
//if (selected<0) //if (selected<0)
// selected=0; // selected=0;
@ -312,8 +313,7 @@ int main ()
clearColor=CRGBA::Black; clearColor=CRGBA::Black;
// Setup view matrix // Setup view matrix
int size=arrayObj.size(); if (!arrayObj.empty())
if (size)
{ {
// Setup hotspot for the 3d listener // Setup hotspot for the 3d listener
plistener->setHotSpot (arrayObj[selected]->getPos()); plistener->setHotSpot (arrayObj[selected]->getPos());

View file

@ -177,7 +177,7 @@ int main(int argc, char* argv[])
} }
// Triangle count // Triangle count
triangles+=faces.size(); triangles+=(uint32)faces.size();
} }
} }
else else

View file

@ -82,7 +82,7 @@ class CMyZoneLighter : public CZoneLighter
pgId= min(pgId, (uint)(BAR_LENGTH-1)); pgId= min(pgId, (uint)(BAR_LENGTH-1));
sprintf (msg, "\r%s: %s", message, progressbar[pgId]); sprintf (msg, "\r%s: %s", message, progressbar[pgId]);
uint i; uint i;
for (i=strlen(msg); i<79; i++) for (i=(uint)strlen(msg); i<79; i++)
msg[i]=' '; msg[i]=' ';
msg[i]=0; msg[i]=0;
printf ("%s\r", msg); printf ("%s\r", msg);

View file

@ -114,7 +114,7 @@
Optimization="4" Optimization="4"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../../common/src/" AdditionalIncludeDirectories="../../../common/src/"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LIBXML_STATIC"
StringPooling="true" StringPooling="true"
MinimalRebuild="true" MinimalRebuild="true"
ExceptionHandling="2" ExceptionHandling="2"

View file

@ -404,8 +404,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
// **** Magic only: try to get a ResistType against this brick // **** Magic only: try to get a ResistType against this brick
for(i=0;i<Properties.size();i++) for(i=0;i<Properties.size();i++)
{ {
string text= Properties[i].Text; string text= toLower(Properties[i].Text);
strlwr(text);
// *** If the property is a DamageType // *** If the property is a DamageType
const string dmgTypeProp= "ma_dmg_type:"; const string dmgTypeProp= "ma_dmg_type:";

View file

@ -1304,6 +1304,7 @@ void postlogInit()
nmsg = "Loading sheets..."; nmsg = "Loading sheets...";
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) ); ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
SheetMngr.setOutputDataPath("../../client/data");
SheetMngr.load (ProgressBar, ClientCfg.UpdatePackedSheet, ClientCfg.NeedComputeVS, ClientCfg.DumpVSIndex); SheetMngr.load (ProgressBar, ClientCfg.UpdatePackedSheet, ClientCfg.NeedComputeVS, ClientCfg.DumpVSIndex);
initLast = initCurrent; initLast = initCurrent;

View file

@ -71,7 +71,7 @@ std::string IActionHandler::getParam (const string &Params, const string &ParamN
{ {
string allparam = Params; string allparam = Params;
skipBlankAtStart (allparam); skipBlankAtStart (allparam);
string param = strlwr (ParamName); string param = toLower (ParamName);
while (allparam.size() > 0) while (allparam.size() > 0)
{ {
std::string::size_type e = allparam.find('='); std::string::size_type e = allparam.find('=');

View file

@ -25,10 +25,11 @@
//----------------------------------------------- //-----------------------------------------------
CDirLightSetup::CDirLightSetup() : Ambiant(0, 0, 0), CDirLightSetup::CDirLightSetup() :
Diffuse(255, 255, 255), Ambiant(0, 0, 0),
Specular(0, 0, 0), Diffuse(255, 255, 255),
Direction(1.f, 0.f, 0.f) Specular(0, 0, 0),
Direction(1.f, 0.f, 0.f)
{ {
} }

View file

@ -170,9 +170,9 @@ namespace <xsl:value-of select="@name"/>
</xsl:if> </xsl:if>
// unused interceptors // unused interceptors
std::string fwdBuildModuleManifest() const { return std::string(); } std::string fwdBuildModuleManifest() const { return std::string(); }
void fwdOnModuleUp(NLNET::IModuleProxy *moduleProxy) {}; void fwdOnModuleUp(NLNET::IModuleProxy *moduleProxy) {}
void fwdOnModuleDown(NLNET::IModuleProxy *moduleProxy) {}; void fwdOnModuleDown(NLNET::IModuleProxy *moduleProxy) {}
void fwdOnModuleSecurityChange(NLNET::IModuleProxy *moduleProxy) {}; void fwdOnModuleSecurityChange(NLNET::IModuleProxy *moduleProxy) {}
// process module message interceptor // process module message interceptor
bool fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &amp;message); bool fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &amp;message);

View file

@ -97,7 +97,7 @@ bool GetBool (const char *var)
// Available ? // Available ?
if (variable) if (variable)
{ {
string _bool = strlwr (variable->asString ()); string _bool = toLower (variable->asString ());
if (_bool == "true") if (_bool == "true")
return true; return true;
if (_bool == "false") if (_bool == "false")

View file

@ -495,8 +495,7 @@ CDisplayDlg::TDriver CDisplayDlg::getActualDriver() const
std::string deviceName; std::string deviceName;
uint64 drvVersion; uint64 drvVersion;
CSystemInfo::getVideoInfo(deviceName, drvVersion); CSystemInfo::getVideoInfo(deviceName, drvVersion);
strlwr(deviceName); return strstr(toLower(deviceName).c_str(), "radeon") != NULL ? Direct3D : OpenGL;
return strstr(deviceName.c_str(), "radeon") != NULL ? Direct3D : OpenGL;
} }
} }
return OpenGL; return OpenGL;