[9330] Fixed msvc compile warnings.

This commit is contained in:
AlexDereka 2010-02-08 16:27:27 +03:00
parent a167fd98d2
commit 696cba9c37
20 changed files with 142 additions and 144 deletions

View file

@ -57,14 +57,8 @@
#if COMPILER == COMPILER_MICROSOFT
# pragma warning(disable:4996) // 'function': was declared deprecated
#ifndef __SHOW_STUPID_WARNINGS__
# pragma warning(disable:4005) // 'identifier' : macro redefinition
# pragma warning(disable:4018) // 'expression' : signed/unsigned mismatch
# pragma warning(disable:4244) // 'argument' : conversion from 'type1' to 'type2', possible loss of data
# pragma warning(disable:4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
# pragma warning(disable:4305) // 'identifier' : truncation from 'type1' to 'type2'
# pragma warning(disable:4311) // 'variable' : pointer truncation from 'type' to 'type'
# pragma warning(disable:4355) // 'this' : used in base member initializer list
# pragma warning(disable:4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
#endif // __SHOW_STUPID_WARNINGS__
#endif // __GNUC__
@ -220,4 +214,8 @@ inline char * mangos_strdup(const char * source)
# define M_PI 3.14159265358979323846
#endif
#ifndef M_PI_F
# define M_PI_F float(M_PI)
#endif
#endif

View file

@ -1,10 +1,10 @@
#include "Common.h"
#include "dotconfpp.h"
#include <ace/OS_NS_stdlib.h>
#ifdef WIN32
# define PATH_MAX _MAX_PATH
# define strcasecmp stricmp
# define realpath(path,resolved_path) _fullpath(resolved_path, path, _MAX_PATH)
# include <io.h>
#else
# include <unistd.h>
@ -405,7 +405,7 @@ int DOTCONFDocument::setContent(const char* _fileName)
int ret = 0;
char realpathBuf[PATH_MAX];
if (realpath(_fileName, realpathBuf) == NULL)
if (ACE_OS::realpath(_fileName, realpathBuf) == NULL)
{
error(0, NULL, "realpath (%s) failed: %s", _fileName, strerror(errno));
return -1;
@ -453,7 +453,7 @@ int DOTCONFDocument::setContent(const char* _fileName)
return -1;
}
if (realpath(tagNode->values[vi], realpathBuf) == NULL)
if (ACE_OS::realpath(tagNode->values[vi], realpathBuf) == NULL)
{
error(tagNode->lineNum, tagNode->fileName, "realpath (%s) failed: %s", tagNode->values[vi], strerror(errno));
return -1;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9329"
#define REVISION_NR "9330"
#endif // __REVISION_NR_H__