← Back to team overview

maria-developers team mailing list archive

[Branch ~maria-captains/maria/5.1] Rev 2848: Fix a bunch of Windows warnings

 

------------------------------------------------------------
revno: 2848
committer: Bo Thorsen <bo@xxxxxxxxxxxx>
branch nick: trunk-winfix
timestamp: Wed 2010-04-21 02:25:59 +0200
message:
  Fix a bunch of Windows warnings
modified:
  extra/yassl/taocrypt/src/algebra.cpp
  sql/hash_filo.cc
  sql/mf_iocache.cc
  sql/repl_failsafe.cc
  sql/sql_repl.cc
  storage/pbxt/src/locklist_xt.cc
  storage/pbxt/src/pbms_enabled.cc
  storage/xtradb/include/univ.i
  storage/xtradb/sync/sync0sync.c


--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1

Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription
=== modified file 'extra/yassl/taocrypt/src/algebra.cpp'
--- extra/yassl/taocrypt/src/algebra.cpp	2009-02-13 16:41:47 +0000
+++ extra/yassl/taocrypt/src/algebra.cpp	2010-04-21 00:25:59 +0000
@@ -18,7 +18,6 @@
 
 /* based on Wei Dai's algebra.cpp from CryptoPP */
 #undef  NDEBUG
-#define DEBUG   // GCC 4.0 bug if NDEBUG and Optimize > 1
 
 #include "runtime.hpp"
 #include "algebra.hpp"

=== modified file 'sql/hash_filo.cc'
--- sql/hash_filo.cc	2006-12-31 00:02:27 +0000
+++ sql/hash_filo.cc	2010-04-21 00:25:59 +0000
@@ -25,3 +25,8 @@
 
 #include "mysql_priv.h"
 #include "hash_filo.h"
+
+#ifdef __WIN__
+// Remove linker warning 4221 about empty file
+namespace { char dummy; };
+#endif // __WIN__

=== modified file 'sql/mf_iocache.cc'
--- sql/mf_iocache.cc	2007-10-11 17:29:09 +0000
+++ sql/mf_iocache.cc	2010-04-21 00:25:59 +0000
@@ -85,6 +85,12 @@
 }
 
 } /* extern "C" */
+
+#elif defined(__WIN__)
+
+// Remove linker warning 4221 about empty file
+namespace { char dummy; };
+
 #endif /* HAVE_REPLICATION */
 
 

=== modified file 'sql/repl_failsafe.cc'
--- sql/repl_failsafe.cc	2010-01-22 10:58:21 +0000
+++ sql/repl_failsafe.cc	2010-04-21 00:25:59 +0000
@@ -1036,5 +1036,10 @@
   return error;
 }
 
+#elif defined(__WIN__)
+
+// Remove linker warning 4221 about empty file
+namespace { char dummy; };
+
 #endif /* HAVE_REPLICATION */
 

=== modified file 'sql/sql_repl.cc'
--- sql/sql_repl.cc	2010-03-04 08:03:07 +0000
+++ sql/sql_repl.cc	2010-04-21 00:25:59 +0000
@@ -1835,6 +1835,11 @@
   return 0;
 }
 
+#elif defined(__WIN__)
+
+// Remove linker warning 4221 about empty file
+namespace { char dummy; };
+
 #endif /* HAVE_REPLICATION */
 
 

=== modified file 'storage/pbxt/src/locklist_xt.cc'
--- storage/pbxt/src/locklist_xt.cc	2009-08-17 11:12:36 +0000
+++ storage/pbxt/src/locklist_xt.cc	2010-04-21 00:25:59 +0000
@@ -186,5 +186,10 @@
 	}
 }
 
+#elif defined(__WIN__)
+
+// Remove linker warning 4221 about empty file
+namespace { char dummy; };
+
 #endif
 

=== modified file 'storage/pbxt/src/pbms_enabled.cc'
--- storage/pbxt/src/pbms_enabled.cc	2009-11-24 10:55:06 +0000
+++ storage/pbxt/src/pbms_enabled.cc	2010-04-21 00:25:59 +0000
@@ -241,4 +241,9 @@
 	 return ;
 }
 
+#elif defined(__WIN__)
+
+// Remove linker warning 4221 about empty file
+namespace { char dummy; };
+
 #endif // PBMS_ENABLED

=== modified file 'storage/xtradb/include/univ.i'
--- storage/xtradb/include/univ.i	2010-01-15 15:58:25 +0000
+++ storage/xtradb/include/univ.i	2010-04-21 00:25:59 +0000
@@ -290,7 +290,7 @@
 /* The 2-logarithm of UNIV_PAGE_SIZE: */
 #define UNIV_PAGE_SIZE_SHIFT	14
 /* The universal page size of the database */
-#define UNIV_PAGE_SIZE		(1 << UNIV_PAGE_SIZE_SHIFT)
+#define UNIV_PAGE_SIZE		(1u << UNIV_PAGE_SIZE_SHIFT)
 
 /* Maximum number of parallel threads in a parallelized operation */
 #define UNIV_MAX_PARALLELISM	32

=== modified file 'storage/xtradb/sync/sync0sync.c'
--- storage/xtradb/sync/sync0sync.c	2010-01-06 12:00:14 +0000
+++ storage/xtradb/sync/sync0sync.c	2010-04-21 00:25:59 +0000
@@ -423,8 +423,11 @@
 	mutex_t*	mutex,	/*!< in: mutex */
 	ulint		n)	/*!< in: value to set */
 {
+#ifndef INNODB_RW_LOCKS_USE_ATOMICS
 	volatile ulint*	ptr;		/* declared volatile to ensure that
 					the value is stored to memory */
+#endif
+
 	ut_ad(mutex);
 
 #ifdef INNODB_RW_LOCKS_USE_ATOMICS