empiredan commented on code in PR #1235:
URL:
https://github.com/apache/incubator-pegasus/pull/1235#discussion_r1019892406
##########
src/aio/file_io.cpp:
##########
@@ -32,7 +32,7 @@ namespace file {
/*extern*/ disk_file *open(const char *file_name, int flag, int pmode)
{
- dsn_handle_t nh = disk_engine::provider().open(file_name, flag, pmode);
+ void *nh = disk_engine::provider().open(file_name, flag, pmode);
Review Comment:
```suggestion
auto nh = disk_engine::provider().open(file_name, flag, pmode);
```
##########
src/aio/aio_provider.h:
##########
@@ -37,7 +36,7 @@ class service_node;
class task_worker_pool;
class task_queue;
-#define DSN_INVALID_FILE_HANDLE ((dsn_handle_t)(uintptr_t)-1)
+#define DSN_INVALID_FILE_HANDLE ((void *)(uintptr_t)-1)
Review Comment:
```suggestion
#define DSN_INVALID_FILE_HANDLE (reinterpret_cast<void *>(-1))
```
##########
src/aio/native_linux_aio_provider.cpp:
##########
@@ -42,16 +42,16 @@
native_linux_aio_provider::native_linux_aio_provider(disk_engine *disk) : aio_pr
native_linux_aio_provider::~native_linux_aio_provider() {}
-dsn_handle_t native_linux_aio_provider::open(const char *file_name, int flag,
int pmode)
+void *native_linux_aio_provider::open(const char *file_name, int flag, int
pmode)
{
- dsn_handle_t fh = (dsn_handle_t)(uintptr_t)::open(file_name, flag, pmode);
+ void *fh = (void *)(uintptr_t)::open(file_name, flag, pmode);
Review Comment:
```suggestion
auto fh = reinterpret_cast<void *>(::open(file_name, flag, pmode));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]