aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorclick <none@none>2010-08-21 19:40:05 +0200
committerclick <none@none>2010-08-21 19:40:05 +0200
commit3febdd7884305d5b9ff427a5295f9aae95533782 (patch)
tree6cd1c3437708b6e64530b72f79b1bf73f0260c7d /src
parentd7814e88d824d3ddf4fbe1275e0e4013f04081b4 (diff)
Core: Remove warning-ignores from Common.h, and fix a shitload of retarded warnings that was hidden by it - NO MORE HIDING IN CORE THANKYOU!
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/server/shared/Common.h31
-rw-r--r--src/server/shared/Database/SQLOperation.cpp1
-rw-r--r--src/server/shared/Utilities/ProgressBar.cpp4
-rw-r--r--src/server/shared/Utilities/ProgressBar.h11
4 files changed, 22 insertions, 25 deletions
diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h
index 371b20ba2f4..6b93ceb5410 100644
--- a/src/server/shared/Common.h
+++ b/src/server/shared/Common.h
@@ -49,7 +49,9 @@
#ifdef VERSION
#undef VERSION
#endif //VERSION
+
# include "config.h"
+
#undef PACKAGE
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
@@ -61,21 +63,6 @@
#include "Define.h"
-#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)
-# pragma warning(disable:4522) //warning when class has 2 constructors
-#endif // __SHOW_STUPID_WARNINGS__
-#endif // __GNUC__
-
#include "Dynamic/UnorderedMap.h"
#include <stdio.h>
#include <stdlib.h>
@@ -88,6 +75,18 @@
#if PLATFORM == PLATFORM_WINDOWS
#define STRCASECMP stricmp
+#define stricmp _stricmp
+#define putenv _putenv
+#define access _access
+#define chdir _chdir
+#define rmdir _rmdir
+#define getcwd _getcwd
+#define swab _swab
+#define unlnk _unlink
+#define mkdir _mkdir
+#define tempnam _tempnam
+#define strdup _strdup
+#define fdopen _fdopen
#else
#define STRCASECMP strcasecmp
#endif
@@ -109,7 +108,6 @@
#include <ace/Thread_Mutex.h>
#if PLATFORM == PLATFORM_WINDOWS
-# define FD_SETSIZE 4096
# include <ace/config-all.h>
// XP winver - needed to compile with standard leak check in MemoryLeaks.h
// uncomment later if needed
@@ -212,4 +210,3 @@ LocaleConstant GetLocaleByName(const std::string& name);
#endif
#endif
-
diff --git a/src/server/shared/Database/SQLOperation.cpp b/src/server/shared/Database/SQLOperation.cpp
index 4d4e5fabb28..25da4344c14 100644
--- a/src/server/shared/Database/SQLOperation.cpp
+++ b/src/server/shared/Database/SQLOperation.cpp
@@ -16,6 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "Common.h"
#include "DatabaseEnv.h"
#include "SQLOperation.h"
#include "MySQLConnection.h"
diff --git a/src/server/shared/Utilities/ProgressBar.cpp b/src/server/shared/Utilities/ProgressBar.cpp
index c24d9f86f6b..1828eca515e 100644
--- a/src/server/shared/Utilities/ProgressBar.cpp
+++ b/src/server/shared/Utilities/ProgressBar.cpp
@@ -35,7 +35,7 @@ barGoLink::~barGoLink()
fflush(stdout);
}
-barGoLink::barGoLink( int row_count )
+barGoLink::barGoLink( uint64 row_count )
{
rec_no = 0;
rec_pos = 0;
@@ -57,7 +57,7 @@ barGoLink::barGoLink( int row_count )
void barGoLink::step( void )
{
- int i, n;
+ uint64 i, n;
if ( num_rec == 0 ) return;
++rec_no;
diff --git a/src/server/shared/Utilities/ProgressBar.h b/src/server/shared/Utilities/ProgressBar.h
index cae23254f30..551944af455 100644
--- a/src/server/shared/Utilities/ProgressBar.h
+++ b/src/server/shared/Utilities/ProgressBar.h
@@ -27,16 +27,15 @@ class barGoLink
static char const * const empty;
static char const * const full;
- int rec_no;
- int rec_pos;
- int num_rec;
- int indic_len;
+ uint64 rec_no;
+ uint64 rec_pos;
+ uint64 num_rec;
+ uint64 indic_len;
public:
void step( void );
- barGoLink( int );
+ barGoLink( uint64 );
~barGoLink();
};
#endif
-