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 variable ‘queue’ [-Werror=unused-variable] #32

Open
capital-hub opened this issue Mar 19, 2021 · 1 comment
Open

error: unused variable ‘queue’ [-Werror=unused-variable] #32

capital-hub opened this issue Mar 19, 2021 · 1 comment

Comments

@capital-hub
Copy link

capital-hub commented Mar 19, 2021

/myproject/external/loki-mq/oxenmq/jobs.cpp:143:28: error: unused variable ‘queue’ [-Werror=unused-variable]
auto& [run, busy, queue] = tagged_workers.emplace_back();

here i attached the screenshot of the code

Screenshot from 2021-03-19 18-04-14

the blue line marked in the code

This error accuried while i run the Makefile in the project , How i fix this

@jagerman
Copy link
Member

This is a quasi-bug in gcc-8 (IIRC) that doesn't properly silence the warning when any of those variables are used. gcc-9 and clang handle it properly.

You can work around it by remove -Werror from CMakeLists.txt; really we should make -Werror a configurable build option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants