Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: unused parameter 'ConfCxt' with -DWASMEDGE_BUILD_AOT_RUNTIME=OFF #318

Closed
0yi0 opened this issue Jul 27, 2021 · 1 comment · Fixed by #319
Closed

Error: unused parameter 'ConfCxt' with -DWASMEDGE_BUILD_AOT_RUNTIME=OFF #318

0yi0 opened this issue Jul 27, 2021 · 1 comment · Fixed by #319
Assignees
Labels
bug Something isn't working

Comments

@0yi0
Copy link
Collaborator

0yi0 commented Jul 27, 2021

When building with cmake -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_AOT_RUNTIME=OFF .. (as instructed in doc/build.md), I got the following error message:

[ 98%] Building CXX object lib/api/CMakeFiles/wasmedge_c.dir/wasmedge.cpp.o
/root/WasmEdge/lib/api/wasmedge.cpp: In function 'WasmEdge_CompilerContext* WasmEdge_CompilerCreate(const WasmEdge_ConfigureContext*)':
/root/WasmEdge/lib/api/wasmedge.cpp:754:58: error: unused parameter 'ConfCxt' [-Werror=unused-parameter]
  754 | WasmEdge_CompilerCreate(const WasmEdge_ConfigureContext *ConfCxt) {
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/root/WasmEdge/lib/api/wasmedge.cpp: In function 'WasmEdge_Result WasmEdge_CompilerCompile(WasmEdge_CompilerContext*, const char*, const char*)':
/root/WasmEdge/lib/api/wasmedge.cpp:767:31: error: unused parameter 'Cxt' [-Werror=unused-parameter]
  767 |     WasmEdge_CompilerContext *Cxt, const char *InPath, const char *OutPath) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/root/WasmEdge/lib/api/wasmedge.cpp:767:48: error: unused parameter 'InPath' [-Werror=unused-parameter]
  767 |     WasmEdge_CompilerContext *Cxt, const char *InPath, const char *OutPath) {
      |                                    ~~~~~~~~~~~~^~~~~~
/root/WasmEdge/lib/api/wasmedge.cpp:767:68: error: unused parameter 'OutPath' [-Werror=unused-parameter]
  767 |     WasmEdge_CompilerContext *Cxt, const char *InPath, const char *OutPath) {
      |                                                        ~~~~~~~~~~~~^~~~~~~
cc1plus: all warnings being treated as errors

Versions

  • WasgmEdge: master (c4452d778636d3af207a0602dbec6276b8099847)
  • Docker image: wasmedge/wasmedge:ubuntu-build-gcc (04cd593f0f1e)
@hydai hydai added the bug Something isn't working label Jul 27, 2021
@hydai
Copy link
Member

hydai commented Jul 27, 2021

When the WASMEDGE_BUILD_AOT_RUNTIME disabled, the ConfCxt will become usused variable in the argument list. It's better to add [[maybe_unused]] attributes in these variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants