maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #01916
[Branch ~maria-captains/maria/5.1] Rev 2798: Fix for compiler warnings on windows
------------------------------------------------------------
revno: 2798
committer: Michael Widenius <monty@xxxxxxxxxxxx>
branch nick: maria-5.1
timestamp: Thu 2010-01-14 18:51:00 +0200
message:
Fix for compiler warnings on windows
Fix wrong cast of time()
modified:
include/my_pthread.h
sql/handler.h
storage/maria/ma_check.c
storage/maria/ma_create.c
storage/myisam/mi_check.c
storage/myisam/mi_create.c
storage/xtradb/handler/ha_innodb.cc
--
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 'include/my_pthread.h'
--- include/my_pthread.h 2009-06-30 12:01:29 +0000
+++ include/my_pthread.h 2010-01-14 16:51:00 +0000
@@ -543,9 +543,9 @@
#else
#define my_pthread_mutex_init(A,B,C,D) pthread_mutex_init((A),(B))
#define my_pthread_mutex_lock(A,B) pthread_mutex_lock(A)
-#define safe_mutex_assert_owner(mp)
-#define safe_mutex_assert_not_owner(mp)
-#define safe_mutex_free_deadlock_data(mp)
+#define safe_mutex_assert_owner(mp) do {} while(0)
+#define safe_mutex_assert_not_owner(mp) do {} while(0)
+#define safe_mutex_free_deadlock_data(mp) do {} while(0)
#endif /* SAFE_MUTEX */
#if defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX)
=== modified file 'sql/handler.h'
--- sql/handler.h 2010-01-04 13:12:53 +0000
+++ sql/handler.h 2010-01-14 16:51:00 +0000
@@ -891,9 +891,9 @@
ulonglong delete_length;
ha_rows records;
ulong mean_rec_length;
- ulong create_time;
- ulong check_time;
- ulong update_time;
+ time_t create_time;
+ time_t check_time;
+ time_t update_time;
ulonglong check_sum;
} PARTITION_INFO;
@@ -1060,9 +1060,9 @@
ha_rows records;
ha_rows deleted; /* Deleted records */
ulong mean_rec_length; /* physical reclength */
- ulong create_time; /* When table was created */
- ulong check_time;
- ulong update_time;
+ time_t create_time; /* When table was created */
+ time_t check_time;
+ time_t update_time;
uint block_size; /* index block size */
ha_statistics():
=== modified file 'storage/maria/ma_check.c'
--- storage/maria/ma_check.c 2009-11-29 23:08:56 +0000
+++ storage/maria/ma_check.c 2010-01-14 16:51:00 +0000
@@ -6018,7 +6018,7 @@
{
if (update & UPDATE_TIME)
{
- share->state.check_time= (long) time((time_t*) 0);
+ share->state.check_time= time((time_t*) 0);
if (!share->state.create_time)
share->state.create_time= share->state.check_time;
}
=== modified file 'storage/maria/ma_create.c'
--- storage/maria/ma_create.c 2009-02-19 09:01:25 +0000
+++ storage/maria/ma_create.c 2010-01-14 16:51:00 +0000
@@ -772,7 +772,7 @@
share.base.min_block_length= share.base.pack_reclength;
if (! (flags & HA_DONT_TOUCH_DATA))
- share.state.create_time= (long) time((time_t*) 0);
+ share.state.create_time= time((time_t*) 0);
pthread_mutex_lock(&THR_LOCK_maria);
=== modified file 'storage/myisam/mi_check.c'
--- storage/myisam/mi_check.c 2009-12-03 11:34:11 +0000
+++ storage/myisam/mi_check.c 2010-01-14 16:51:00 +0000
@@ -4447,7 +4447,7 @@
{
if (update & UPDATE_TIME)
{
- share->state.check_time= (long) time((time_t*) 0);
+ share->state.check_time= time((time_t*) 0);
if (!share->state.create_time)
share->state.create_time=share->state.check_time;
}
=== modified file 'storage/myisam/mi_create.c'
--- storage/myisam/mi_create.c 2009-10-15 21:38:29 +0000
+++ storage/myisam/mi_create.c 2010-01-14 16:51:00 +0000
@@ -575,7 +575,7 @@
max(share.base.pack_reclength,MI_MIN_BLOCK_LENGTH) :
MI_EXTEND_BLOCK_LENGTH;
if (! (flags & HA_DONT_TOUCH_DATA))
- share.state.create_time= (long) time((time_t*) 0);
+ share.state.create_time= time((time_t*) 0);
pthread_mutex_lock(&THR_LOCK_myisam);
=== modified file 'storage/xtradb/handler/ha_innodb.cc'
--- storage/xtradb/handler/ha_innodb.cc 2009-12-03 11:34:11 +0000
+++ storage/xtradb/handler/ha_innodb.cc 2010-01-14 16:51:00 +0000
@@ -61,7 +61,9 @@
#pragma implementation // gcc: Class implementation
#endif
+#ifndef MYSQL_SERVER
#define MYSQL_SERVER
+#endif
#include <mysql_priv.h>
#ifdef MYSQL_SERVER