Skip to content

Compilation error in Ubuntu 20 #2

Open
@embaba

Description

@embaba

Compilation error in Ubuntu 20 + gcc 7.5 :

/home/xxx/bots2d/src/renderer/ImGuiOverlay.cpp: In static member function ‘static void ImGuiOverlay::text(std::__cxx11::string)’:
/home/xxx/bots2d/src/renderer/ImGuiOverlay.cpp:62:29: error: format not a string literal and no format arguments [-Werror=format-security]
     ImGui::Text(text.c_str());
                             ^
cc1plus: all warnings being treated as errors

Replacing

 ImGui::Text(text.c_str()); 

by

 ImGui::TextUnformatted(text.c_str());

seems to be the solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions