Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
Compiler warnings
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
I get these compiler warnings when trying to compile anything with the nuklear.h header.
```
1>tfury_nuklear.c
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(5668,47): warning C5287: operands are different enum types 'nk_panel_set' and 'nk_panel_type'; use an explicit cast to silence this warning
1>(compiling source file 'backend/tfury_nuklear.c')
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(5669,42): warning C5287: operands are different enum types 'nk_panel_set' and 'nk_panel_type'; use an explicit cast to silence this warning
1>(compiling source file 'backend/tfury_nuklear.c')
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(5761,46): warning C5287: operands are different enum types 'nk_window_flags' and 'nk_panel_flags'; use an explicit cast to silence this warning
1>(compiling source file 'backend/tfury_nuklear.c')
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(6935,34): warning C4127: conditional expression is constant
1>(compiling source file 'backend/tfury_nuklear.c')
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(10067,29): warning C4127: conditional expression is constant
1>(compiling source file 'backend/tfury_nuklear.c')
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(29037,49): warning C5287: operands are different enum types 'nk_edit_types' and 'nk_edit_flags'; use an explicit cast to silence this warning
1>(compiling source file 'backend/tfury_nuklear.c')
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(30275,1): warning C4701: potentially uninitialized local variable 'text' used
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(30172,1): warning C4701: potentially uninitialized local variable 'sym_background' used
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear_console\nuklear_console_label.h(78,1): warning C4700: uninitialized local variable 'handle' used
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear_console\nuklear_console.h(1038,1): warning C4700: uninitialized local variable 'handle' used
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(23944,1): warning C4701: potentially uninitialized local variable 'label' used
1>D:\sourcecode\TerminalFury\TerminalFury\core\backend\nuklear\nuklear.h(25629,1): warning C4701: potentially uninitialized local variable 'text' used
```
Contributor guide
Research direction
Reproduce the MSVC build of backend/tfury_nuklear.c and inspect the reported locations in nuklear.h, nuklear_console_label.h, and nuklear_console.h. Address the listed compiler diagnostics, then rebuild to confirm those warnings no longer appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100