Mr-Leshiy
c2c7d5e916
Fix cast-function-type warning (#8230)
Summary:
Fixing cast-function-type which is appears during the following build:
```bash
cmake .. -DFAIL_ON_WARNINGS=ON -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows
make rocksdb
```
Here is the log:
```
/home/leshiy/Work/rocksdb/port/win/env_win.cc: In constructor ‘rocksdb::port::WinClock::WinClock()’:
/home/leshiy/Work/rocksdb/port/win/env_win.cc:92:9: error: cast between incompatible function types from ‘FARPROC’ {aka ‘long long int (*)()’} to ‘rocksdb::port::WinClock::FnGetSystemTimePreciseAsFileTime’ {aka ‘void (*)(_FILETIME*)’} [-Werror=cast-function-type]
92 | (FnGetSystemTimePreciseAsFileTime)GetProcAddress(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93 | module, "GetSystemTimePreciseAsFileTime");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/rocksdb.dir/build.make:4337: CMakeFiles/rocksdb.dir/port/win/env_win.cc.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/rocksdb.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
```
Pull Request resolved: https://github.com/facebook/rocksdb/pull/8230
Reviewed By: jay-zhuang
Differential Revision: D28000215
Pulled By: mrambacher
fbshipit-source-id: 874782cf48f70470e3fbd9097585bf42e810ca61
2021-04-26 10:13:55 -07:00
..
2021-01-06 10:49:32 -08:00
2021-04-26 10:13:55 -07:00
2021-01-25 22:09:11 -08:00
2021-01-06 10:49:32 -08:00
2021-03-24 23:07:27 -07:00
2020-10-01 09:23:04 -07:00
2021-04-16 12:11:16 -07:00
2020-09-23 12:55:54 -07:00
2021-03-15 04:34:11 -07:00
2021-03-15 04:34:11 -07:00
2020-09-23 12:55:54 -07:00
2020-02-20 12:09:57 -08:00
2020-09-25 09:01:45 -07:00
2020-09-25 09:01:45 -07:00