Skip to content

not able to compile it with the g++ command in the comment #1792

@wangyihanlarry

Description

@wangyihanlarry

* g++ -O2 -g -shared -rdynamic -fPIC -o cpp_null null.c \

hi I'm not able to complile the null.c with the command, could u please doube check the code

g++ -O2 -g -shared -rdynamic -fPIC -o cpp_null null.c -include ../config-host.h -DFIO_EXTERNAL_ENGINE
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
null.c:110:7: error: assigning to 'struct null_data *' from incompatible type 'void *'
nd = malloc(sizeof(*nd));
^~~~~~~~~~~~~~~~~~~
null.c:115:15: error: assigning to 'struct io_u **' from incompatible type 'void *'
nd->io_us = calloc(td->o.iodepth, sizeof(struct io_u *));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    patcheswelcomeNo one internal is working on this but an external contributor's help is very welcome!

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions