diff options
author | unknown <marko@hundin.mysql.fi> | 2005-06-10 15:55:00 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-06-10 15:55:00 +0300 |
commit | f6da55d8ceb1ca731c7d5aeba11f7b858f253b30 (patch) | |
tree | 9b4fa2d2c7a8fab2cc64adbd020e949169a9d1bf | |
parent | 2ebdd2d90a512812f366732e32dc4d42c323e004 (diff) | |
download | mariadb-git-f6da55d8ceb1ca731c7d5aeba11f7b858f253b30.tar.gz |
InnoDB: Remove compiler warning
innobase/fil/fil0fil.c:
Move the declaration of fil_node_t to os0file.h.
Remove type casting from address-of operation
(which would break strict aliasing rules)
innobase/include/os0file.h:
Declare fil_node_t as an opaque structure.
Replace void* message1 with fil_node_t* message1.
innobase/os/os0file.c:
Replace void* message1 with fil_node_t* message1.
-rw-r--r-- | innobase/fil/fil0fil.c | 3 | ||||
-rw-r--r-- | innobase/include/os0file.h | 10 | ||||
-rw-r--r-- | innobase/os/os0file.c | 12 |
3 files changed, 13 insertions, 12 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index e8efdcfbce0..211ad1d01ed 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -98,7 +98,6 @@ ulint fil_n_pending_tablespace_flushes = 0; fil_addr_t fil_addr_null = {FIL_NULL, 0}; /* File node of a tablespace or the log data space */ -typedef struct fil_node_struct fil_node_t; struct fil_node_struct { fil_space_t* space; /* backpointer to the space where this node belongs */ @@ -4037,7 +4036,7 @@ fil_aio_wait( } else { srv_set_io_thread_op_info(segment, "simulated aio handle"); - ret = os_aio_simulated_handle(segment, (void**) &fil_node, + ret = os_aio_simulated_handle(segment, &fil_node, &message, &type); } diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h index 729ad81da9c..e75281dd93c 100644 --- a/innobase/include/os0file.h +++ b/innobase/include/os0file.h @@ -17,6 +17,8 @@ Created 10/21/1995 Heikki Tuuri #include <time.h> #endif +typedef struct fil_node_struct fil_node_t; + extern ibool os_do_not_call_flush_at_each_write; extern ibool os_has_said_disk_full; extern ibool os_aio_print_debug; @@ -563,7 +565,7 @@ os_aio( ulint offset_high, /* in: most significant 32 bits of offset */ ulint n, /* in: number of bytes to read or write */ - void* message1,/* in: messages for the aio handler (these + fil_node_t* message1,/* in: messages for the aio handler (these can be used to identify a completed aio operation); if mode is OS_AIO_SYNC, these are ignored */ @@ -621,7 +623,7 @@ os_aio_windows_handle( ignored */ ulint pos, /* this parameter is used only in sync aio: wait for the aio slot at this position */ - void** message1, /* out: the messages passed with the aio + fil_node_t**message1, /* out: the messages passed with the aio request; note that also in the case where the aio operation failed, these output parameters are valid and can be used to @@ -641,7 +643,7 @@ os_aio_posix_handle( /*================*/ /* out: TRUE if the aio operation succeeded */ ulint array_no, /* in: array number 0 - 3 */ - void** message1, /* out: the messages passed with the aio + fil_node_t**message1, /* out: the messages passed with the aio request; note that also in the case where the aio operation failed, these output parameters are valid and can be used to @@ -661,7 +663,7 @@ os_aio_simulated_handle( i/o thread, segment 1 the log i/o thread, then follow the non-ibuf read threads, and as the last are the non-ibuf write threads */ - void** message1, /* out: the messages passed with the aio + fil_node_t**message1, /* out: the messages passed with the aio request; note that also in the case where the aio operation failed, these output parameters are valid and can be used to diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 01cddcd19a5..caa1fe0aa10 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -83,7 +83,7 @@ struct os_aio_slot_struct{ made and only the slot message needs to be passed to the caller of os_aio_simulated_handle */ - void* message1; /* message which is given by the */ + fil_node_t* message1; /* message which is given by the */ void* message2; /* the requester of an aio operation and which can be used to identify which pending aio operation was @@ -3025,7 +3025,7 @@ os_aio_array_reserve_slot( /* out: pointer to slot */ ulint type, /* in: OS_FILE_READ or OS_FILE_WRITE */ os_aio_array_t* array, /* in: aio array */ - void* message1,/* in: message to be passed along with + fil_node_t* message1,/* in: message to be passed along with the aio operation */ void* message2,/* in: message to be passed along with the aio operation */ @@ -3287,7 +3287,7 @@ os_aio( ulint offset_high, /* in: most significant 32 bits of offset */ ulint n, /* in: number of bytes to read or write */ - void* message1,/* in: messages for the aio handler (these + fil_node_t* message1,/* in: messages for the aio handler (these can be used to identify a completed aio operation); if mode is OS_AIO_SYNC, these are ignored */ @@ -3472,7 +3472,7 @@ os_aio_windows_handle( ignored */ ulint pos, /* this parameter is used only in sync aio: wait for the aio slot at this position */ - void** message1, /* out: the messages passed with the aio + fil_node_t**message1, /* out: the messages passed with the aio request; note that also in the case where the aio operation failed, these output parameters are valid and can be used to @@ -3563,7 +3563,7 @@ os_aio_posix_handle( /*================*/ /* out: TRUE if the aio operation succeeded */ ulint array_no, /* in: array number 0 - 3 */ - void** message1, /* out: the messages passed with the aio + fil_node_t**message1, /* out: the messages passed with the aio request; note that also in the case where the aio operation failed, these output parameters are valid and can be used to @@ -3644,7 +3644,7 @@ os_aio_simulated_handle( i/o thread, segment 1 the log i/o thread, then follow the non-ibuf read threads, and as the last are the non-ibuf write threads */ - void** message1, /* out: the messages passed with the aio + fil_node_t**message1, /* out: the messages passed with the aio request; note that also in the case where the aio operation failed, these output parameters are valid and can be used to |