Compilation warnings clean-up
Guillaume227 opened this issue · 3 comments
I have noticed the following warnings when building on windows.
Absolutely not critical but I like to have a clean build, so would be nice to get rid of them.
Let me know if you would like a PR or just handle them on your end when time permits.
Commenting out the parameter name should do for those:
hello_imgui\hello_imgui_cmake\HelloImGui_WinMain.cpp(7): warning C4100: 'nCmdShow': unreferenced formal parameter
hello_imgui\hello_imgui_cmake\HelloImGui_WinMain.cpp(7): warning C4100: 'lpCmdLine': unreferenced formal parameter
hello_imgui\hello_imgui_cmake\HelloImGui_WinMain.cpp(7): warning C4100: 'hPrevInstance': unreferenced formal parameter
hello_imgui\hello_imgui_cmake\HelloImGui_WinMain.cpp(7): warning C4100: 'hInstance': unreferenced formal parameter
hello_imgui\internal\backend_impls\backend_window_helper\glfw_window_helper.cpp(14): warning C4100: 'backendOptions': unreferenced formal parameter
Not sure about that one:
hello_imgui\internal\backend_impls\backend_window_helper\glfw_window_helper.cpp(9): warning C4505: 'HelloImGui::BackendApi::glfw_error_callback': unreferenced function with internal linkage has been removed
That one is probably a release vs debug thing: the value is used by an assert macro that does not do anything in release.
hello_imgui\internal\backend_impls\runner_glfw_opengl3.cpp(42): warning C4189: 'glfwInitSuccess': local variable is initialized but not referenced
A static_cast should be ok for that one (although that's 3rd party code):
hello_imgui\src\hello_imgui\..\hello_imgui/internal/pnm.h(1046): warning C4267: 'argument': conversion from 'size_t' to 'const uint8_t', possible loss of data
Hello,
Thanks for this. A PR would be perfect!
concerning the unused variable you can silence the warning with
`(void)varName;ˋ
What about the glfw_error_callback
warning ? Seems like maybe we forgot to set that callback with glfwSetErrorCallback(glfw_error_callback);
? I am not sure where that statement should go though.
What about the glfw_error_callback warning ? Seems like maybe we forgot to set that callback with glfwSetErrorCallback(glfw_error_callback); ? I am not sure where that statement should go though.
It is unused. I'll remove it.