Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in Ubuntu 20 #2

Open
embaba opened this issue Apr 20, 2022 · 1 comment
Open

Compilation error in Ubuntu 20 #2

embaba opened this issue Apr 20, 2022 · 1 comment

Comments

@embaba
Copy link

embaba commented Apr 20, 2022

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.

@niklasab
Copy link
Member

Thanks for pointing this out. I will fix a patch for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants