diff options
author | unknown <marko@hundin.mysql.fi> | 2005-03-07 12:03:33 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-03-07 12:03:33 +0200 |
commit | 9c6cc47f749d37fb0cc9d5ff48818237bacd5012 (patch) | |
tree | 4565fc5d7d0ed12c3a3ced426325b262f97ed87b /innobase/os | |
parent | ae81d53048643da4b110c936eaec0a895af06219 (diff) | |
download | mariadb-git-9c6cc47f749d37fb0cc9d5ff48818237bacd5012.tar.gz |
InnoDB: Portability fixes for warnings reported on IA-64 Windows
innobase/buf/buf0lru.c:
Portability fix: Use %p for printing pointers
innobase/dict/dict0dict.c:
Properly cast the arguments of toupper()
innobase/eval/eval0proc.c:
Declare loop_var_value with a matching data type.
innobase/include/mem0mem.ic:
Remove implicit type conversion
innobase/include/page0page.ic:
Portability fix: Use %p for printing pointers
innobase/include/pars0pars.h:
Remove implicit type conversion
innobase/include/pars0sym.h:
Remove implicit type conversion
innobase/mem/mem0dbg.c:
Portability fix: Use %p for printing pointers
innobase/os/os0file.c:
Add DWORD casts for Windows
innobase/os/os0sync.c:
Add DWORD casts for Windows
innobase/os/os0thread.c:
Add DWORD casts for Windows
innobase/rem/rem0cmp.c:
Make implicit type conversions explicit
innobase/row/row0mysql.c:
Make implicit type conversions explicit
innobase/row/row0sel.c:
Portability fix: Use %p for printing pointers
innobase/trx/trx0sys.c:
Declare trx_sys_mysql_bin_log_pos_high and
trx_sys_mysql_bin_log_pos_low with a matching data type
innobase/ut/ut0ut.c:
Make implicit type conversion explicit
Diffstat (limited to 'innobase/os')
-rw-r--r-- | innobase/os/os0file.c | 22 | ||||
-rw-r--r-- | innobase/os/os0sync.c | 4 | ||||
-rw-r--r-- | innobase/os/os0thread.c | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index cc743ffad41..8d1ad895aa9 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -2042,8 +2042,8 @@ try_again: ut_ad(buf); ut_ad(n > 0); - low = offset; - high = offset_high; + low = (DWORD) offset; + high = (DWORD) offset_high; /* Protect the seek / read operation with a mutex */ i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES; @@ -2059,7 +2059,7 @@ try_again: goto error_handling; } - ret = ReadFile(file, buf, n, &len, NULL); + ret = ReadFile(file, buf, (DWORD) n, &len, NULL); os_mutex_exit(os_file_seek_mutexes[i]); @@ -2145,8 +2145,8 @@ try_again: ut_ad(buf); ut_ad(n > 0); - low = offset; - high = offset_high; + low = (DWORD) offset; + high = (DWORD) offset_high; /* Protect the seek / read operation with a mutex */ i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES; @@ -2162,7 +2162,7 @@ try_again: goto error_handling; } - ret = ReadFile(file, buf, n, &len, NULL); + ret = ReadFile(file, buf, (DWORD) n, &len, NULL); os_mutex_exit(os_file_seek_mutexes[i]); @@ -2231,8 +2231,8 @@ os_file_write( ut_ad(buf); ut_ad(n > 0); retry: - low = offset; - high = offset_high; + low = (DWORD) offset; + high = (DWORD) offset_high; /* Protect the seek / write operation with a mutex */ i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES; @@ -2259,7 +2259,7 @@ retry: return(FALSE); } - ret = WriteFile(file, buf, n, &len, NULL); + ret = WriteFile(file, buf, (DWORD) n, &len, NULL); /* Always do fsync to reduce the probability that when the OS crashes, a database page is only partially physically written to disk. */ @@ -3244,7 +3244,7 @@ os_aio( #ifdef WIN_ASYNC_IO ibool retval; BOOL ret = TRUE; - DWORD len = n; + DWORD len = (DWORD) n; void* dummy_mess1; void* dummy_mess2; ulint dummy_type; @@ -4091,7 +4091,7 @@ loop: if (os_n_file_reads == os_n_file_reads_old) { avg_bytes_read = 0.0; } else { - avg_bytes_read = os_bytes_read_since_printout / + avg_bytes_read = (double) os_bytes_read_since_printout / (os_n_file_reads - os_n_file_reads_old); } diff --git a/innobase/os/os0sync.c b/innobase/os/os0sync.c index c48c44a4c70..18d92af5054 100644 --- a/innobase/os/os0sync.c +++ b/innobase/os/os0sync.c @@ -361,7 +361,7 @@ os_event_wait_time( ut_a(event); if (time != OS_SYNC_INFINITE_TIME) { - err = WaitForSingleObject(event->handle, time / 1000); + err = WaitForSingleObject(event->handle, (DWORD) time / 1000); } else { err = WaitForSingleObject(event->handle, INFINITE); } @@ -408,7 +408,7 @@ os_event_wait_multiple( ut_a(native_event_array); ut_a(n > 0); - index = WaitForMultipleObjects(n, native_event_array, + index = WaitForMultipleObjects((DWORD) n, native_event_array, FALSE, /* Wait for any 1 event */ INFINITE); /* Infinite wait time limit */ diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c index 12a8abf3069..0278e3b2b66 100644 --- a/innobase/os/os0thread.c +++ b/innobase/os/os0thread.c @@ -100,7 +100,7 @@ os_thread_create( { #ifdef __WIN__ os_thread_t thread; - ulint win_thread_id; + DWORD win_thread_id; os_mutex_enter(os_sync_mutex); os_thread_count++; @@ -253,7 +253,7 @@ os_thread_sleep( ulint tm) /* in: time in microseconds */ { #ifdef __WIN__ - Sleep(tm / 1000); + Sleep((DWORD) tm / 1000); #elif defined(__NETWARE__) delay(tm / 1000); #else |