null: fix compile time warning on OpenBSD
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 15 Jan 2018 19:52:10 +0000 (21:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Jan 2018 15:32:36 +0000 (08:32 -0700)
commit7746976c9230e7b3349ad27136b0cd8784f0c405
tree3586ade230a0be058c95d4ed185f8f3b25f2e79a
parent53bb5d9c037e842970b32bc828dbe809b42c144d
null: fix compile time warning on OpenBSD

Fix the following warning on OpenBSD 6.2 (gcc 4.2.1).
This can probably be silenced with void** argument and memcpy() too,
but returning a non-void pointer is clearer IMO when the code also
targets C++.

Compiles with regular make/gmake as well as
 # g++ -O2 -g -shared -rdynamic -fPIC -o cpp_null null.c -DFIO_EXTERNAL_ENGINE

--
    CC engines/null.o
engines/null.c: In function 'fio_null_init':
engines/null.c:142: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/null.c