Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
fictional_handle -Wunused-variable
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
Curious if `fictional_handle` can be removed or avoided? Building without `STB_TRUETYPE_IMPLEMENTATION` on gcc (7.5.0) with `-Wunused-variable` complains that `fictional_handle` is unused.
https://github.com/Immediate-Mode-UI/Nuklear/blob/9f0bca461b028c1f8b638beeba1859045ebe1ac3/src/nuklear.h#L5473
It also seems strange not to have an `nk_` prefix for a global that appears outside an `NK_IMPLEMENTATION` block.
This makes development builds with `-Werror` harder.
Contributor guide
Research direction
Inspect src/nuklear.h around line 5473 and compare builds with and without STB_TRUETYPE_IMPLEMENTATION using GCC's -Wunused-variable. The issue is done when fictional_handle no longer produces an unused-variable warning in the affected configuration without introducing a new warning or breaking the header-only build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100