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

main.cpp: unused-but-set-variable warnings for command line options with CONFIG+=serveronly #2574

Closed
hoffie opened this issue Apr 1, 2022 · 0 comments · Fixed by #2660
Closed
Labels
bug Something isn't working

Comments

@hoffie
Copy link
Member

hoffie commented Apr 1, 2022

Describe the bug

When building with CONFIG+=serveronly, gcc 10.2.1 emits the following warnings:

src/main.cpp: In function 'int main(int, char**)':
src/main.cpp:83:18: warning: variable 'bShowComplRegConnList' set but not used [-Wunused-but-set-variable]
   83 |     bool         bShowComplRegConnList       = false;
      |                  ^~~~~~~~~~~~~~~~~~~~~
src/main.cpp:87:18: warning: variable 'bShowAnalyzerConsole' set but not used [-Wunused-but-set-variable]
   87 |     bool         bShowAnalyzerConsole        = false;
      |                  ^~~~~~~~~~~~~~~~~~~~
src/main.cpp:88:18: warning: variable 'bMuteStream' set but not used [-Wunused-but-set-variable]
   88 |     bool         bMuteStream                 = false;
      |                  ^~~~~~~~~~~
src/main.cpp:92:18: warning: variable 'bNoAutoJackConnect' set but not used [-Wunused-but-set-variable]
   92 |     bool         bNoAutoJackConnect          = false;
      |                  ^~~~~~~~~~~~~~~~~~

To Reproduce

qmake CONFIG+=serveronly && make

Expected behavior

No warnings.

  1. Those variables should either be used in the sense that we output an error/warning to the user if they are enabled despite not having an effect.
  2. Alternatively, support for those flags and variables could be #ifdef'd out.
  3. We could silence the warnings via Q_UNUSED(). I don't think we should do that.

Screenshots

Operating system

Debian 11

Version of Jamulus

master (a9deb22)

@hoffie hoffie added the bug Something isn't working label Apr 1, 2022
@pljones pljones linked a pull request Jun 19, 2022 that will close this issue
5 tasks
pljones added a commit to pljones/jamulus that referenced this issue Jun 22, 2022
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.

1 participant