From 1820aaf44419e7474e46aaa9657b36cf915edb23 Mon Sep 17 00:00:00 2001 From: luk1337 Date: Tue, 23 Jul 2019 18:41:27 +0200 Subject: [PATCH] imgui_freetype: Initialize FT_MemoryRec_ struct manually (#2686) This fixes gcc warning: missing field 'alloc' initializer [-Wmissing-field-initializers] --- misc/freetype/imgui_freetype.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/freetype/imgui_freetype.cpp b/misc/freetype/imgui_freetype.cpp index d0d2580d..d3f2bf54 100644 --- a/misc/freetype/imgui_freetype.cpp +++ b/misc/freetype/imgui_freetype.cpp @@ -646,7 +646,8 @@ static void* FreeType_Realloc(FT_Memory /*memory*/, long cur_size, long new_size bool ImGuiFreeType::BuildFontAtlas(ImFontAtlas* atlas, unsigned int extra_flags) { // FreeType memory management: https://www.freetype.org/freetype2/docs/design/design-4.html - FT_MemoryRec_ memory_rec = { 0 }; + FT_MemoryRec_ memory_rec = {}; + memory_rec.user = NULL; memory_rec.alloc = &FreeType_Alloc; memory_rec.free = &FreeType_Free; memory_rec.realloc = &FreeType_Realloc;