Fix warning due to usage of GNU extension `##__VA_ARGS__`
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the only warning I see when building libnomp is the following:
In file included from /Users/thili/Repos/nomp-org/libnomp/src/nomp.c:1:
In file included from /Users/thili/Repos/nomp-org/libnomp/include/nomp-impl.h:26:
/Users/thili/Repos/nomp-org/libnomp/include/nomp-log.h:51:52: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
nomp_log_(desc, logno, type, __FILE__, __LINE__, ##__VA_ARGS__)
This is due to the usage of ##__VA_ARGS__ which is a GNU extension (although widely supported by different compilers).
Once this is fixed, we should treat warnings as errors in CMakeLists.txt:
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the variadic logging macro in include/nomp-log.h and the warning configuration in CMakeLists.txt. Build libnomp with the relevant compiler warnings enabled; done means the GNU variadic-macro warning is gone and warnings are treated as errors through the requested CMake setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100