WebAssembly / wasm-c-api

Wasm C API prototype
Apache License 2.0
534 stars 77 forks source link

Problems with the C API header #154

Closed DagAgren closed 3 years ago

DagAgren commented 3 years ago

Some of the function defines, like WASM_API_EXTERN own wasm_config_t* wasm_config_new(); are not quite correct, and should use (void) for the arguments. () works, but defines a function with undeclared arguments, rather than one with no arguments. Xcode, at least, will by default warn on this:

.../wasm.h:121:51: This function declaration is not a prototype
rossberg commented 3 years ago

Ah, good point. Old C++ habits, which clang doesn't warn about by default. Would you be interested in creating a PR? :)