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

Windows clang-cl -Wunused-variable warning #221

Closed
DaanDeMeyer opened this issue Apr 6, 2019 · 3 comments
Closed

Windows clang-cl -Wunused-variable warning #221

DaanDeMeyer opened this issue Apr 6, 2019 · 3 comments

Comments

@DaanDeMeyer
Copy link
Contributor

I get the following warning from the source file where I define DOCTEST_IMPLEMENT_CONFIG_WITH_MAIN

Clang version is 8.0.0

In file included from ..\external\doctest\main.cpp:3:
..\external\doctest\doctest.h(5766,5): warning: unused variable '_DOCTEST_ANON_REPORTER_6' [-Wunused-variable]
    DOCTEST_REGISTER_REPORTER("console", 0, ConsoleReporter);
    ^
..\external\doctest\doctest.h(2030,32): note: expanded from macro 'DOCTEST_REGISTER_REPORTER'
    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_REPORTER_)) =                       \
                               ^
..\external\doctest\doctest.h(319,30): note: expanded from macro 'DOCTEST_ANONYMOUS'
#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __COUNTER__)
                             ^
..\external\doctest\doctest.h(317,29): note: expanded from macro 'DOCTEST_CAT'
#define DOCTEST_CAT(s1, s2) DOCTEST_CAT_IMPL(s1, s2)
                            ^
..\external\doctest\doctest.h(316,34): note: expanded from macro 'DOCTEST_CAT_IMPL'
#define DOCTEST_CAT_IMPL(s1, s2) s1##s2
                                 ^
<scratch space>(245,1): note: expanded from here
_DOCTEST_ANON_REPORTER_6
^
1 warning generated.
@onqtam
Copy link
Member

onqtam commented Apr 7, 2019

latest version of the framework?

@onqtam
Copy link
Member

onqtam commented Apr 7, 2019

I just pushed a fix in the dev branch - let me know if it works

@DaanDeMeyer
Copy link
Contributor Author

It works, I'm getting no more errors.

Thanks for the quick response!

@onqtam onqtam changed the title Windows clang-cl Wunused-variable warning Windows clang-cl -Wunused-variable warning Nov 5, 2021
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