Repository: ocornut/imgui (language: rust)

Issue:
clang warnings in v1.42
```
c++ -I/usr/local/include -Wall -c -o ../imgui/imgui.o ../imgui/imgui.cpp
../imgui/imgui.cpp:10867:33: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
                ImGui::TreePush((void*)i);
                                ^
../imgui/imgui.cpp:10908:37: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
                if (ImGui::TreeNode((void*)i, "Child %d", i))
                                    ^
2 warnings generated.
```



Discussion / hints:

Fix patch:
diff --git a/imgui.cpp b/imgui.cpp
index 8b10090d6aca..44fd0818efe1 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -10864,7 +10864,7 @@ void ImGui::ShowTestWindow(bool* opened)
             {
                 ImFont* font = ImGui::GetIO().Fonts->Fonts[i];
                 ImGui::BulletText("Font %d: %.2f pixels, %d glyphs", i, font->FontSize, font->Glyphs.Size);
-                ImGui::TreePush((void*)i);
+                ImGui::TreePush((void*)(size_t)i);
                 ImGui::PushFont(font);
                 ImGui::Text("The quick brown fox jumps over the lazy dog");
                 ImGui::PopFont();
@@ -10905,7 +10905,7 @@ void ImGui::ShowTestWindow(bool* opened)
         {
             for (int i = 0; i < 5; i++)
             {
-                if (ImGui::TreeNode((void*)i, "Child %d", i))
+                if (ImGui::TreeNode((void*)(size_t)i, "Child %d", i))
                 {
                     ImGui::Text("blah blah");
                     ImGui::SameLine();


Test patch: