Commit 2565c02c authored by Marko Mäkelä's avatar Marko Mäkelä

Remove unnecessary type casts

parent 5c159c90
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2009, Percona Inc. Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2018, MariaDB Corporation. Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted Portions of this file contain modifications contributed and copyrighted
by Percona Inc.. Those modifications are by Percona Inc.. Those modifications are
...@@ -1766,6 +1766,8 @@ LinuxAIOHandler::resubmit(Slot* slot) ...@@ -1766,6 +1766,8 @@ LinuxAIOHandler::resubmit(Slot* slot)
slot->n_bytes = 0; slot->n_bytes = 0;
slot->io_already_done = false; slot->io_already_done = false;
compile_time_assert(sizeof(off_t) >= sizeof(os_offset_t));
struct iocb* iocb = &slot->control; struct iocb* iocb = &slot->control;
if (slot->type.is_read()) { if (slot->type.is_read()) {
...@@ -1775,7 +1777,7 @@ LinuxAIOHandler::resubmit(Slot* slot) ...@@ -1775,7 +1777,7 @@ LinuxAIOHandler::resubmit(Slot* slot)
slot->file, slot->file,
slot->ptr, slot->ptr,
slot->len, slot->len,
static_cast<off_t>(slot->offset)); slot->offset);
} else { } else {
ut_a(slot->type.is_write()); ut_a(slot->type.is_write());
...@@ -1785,7 +1787,7 @@ LinuxAIOHandler::resubmit(Slot* slot) ...@@ -1785,7 +1787,7 @@ LinuxAIOHandler::resubmit(Slot* slot)
slot->file, slot->file,
slot->ptr, slot->ptr,
slot->len, slot->len,
static_cast<off_t>(slot->offset)); slot->offset);
} }
iocb->data = slot; iocb->data = slot;
...@@ -6316,7 +6318,7 @@ AIO::reserve_slot( ...@@ -6316,7 +6318,7 @@ AIO::reserve_slot(
#ifdef _WIN32 #ifdef _WIN32
slot->len = static_cast<DWORD>(len); slot->len = static_cast<DWORD>(len);
#else #else
slot->len = static_cast<ulint>(len); slot->len = len;
#endif /* _WIN32 */ #endif /* _WIN32 */
slot->type = type; slot->type = type;
slot->buf = static_cast<byte*>(buf); slot->buf = static_cast<byte*>(buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment