Satisfy GCC -Wformat-security with string literals

This commit is contained in:
Christopher Hewitt
2022-01-25 14:02:52 -07:00
parent 75da59833a
commit 2c3b603b88
6 changed files with 14 additions and 14 deletions

View File

@ -43,10 +43,10 @@ namespace module_manager_menu {
ImGui::TableNextRow();
ImGui::TableSetColumnIndex(0);
ImGui::Text(name.c_str());
ImGui::Text("%s", name.c_str());
ImGui::TableSetColumnIndex(1);
ImGui::Text(inst.module.info->name);
ImGui::Text("%s", inst.module.info->name);
ImGui::TableSetColumnIndex(2);
ImVec2 origPos = ImGui::GetCursorPos();
@ -69,7 +69,7 @@ namespace module_manager_menu {
}
ImGui::GenericDialog("module_mgr_error_", errorOpen, GENERIC_DIALOG_BUTTONS_OK, []() {
ImGui::Text(errorMessage.c_str());
ImGui::Text("%s", errorMessage.c_str());
});
// Add module row with slightly different settings
@ -114,4 +114,4 @@ namespace module_manager_menu {
core::configManager.release(true);
}
}
}
}

View File

@ -129,8 +129,8 @@ namespace vfo_color_menu {
core::configManager.release(true);
}
ImGui::SameLine();
ImGui::Text(name.c_str());
ImGui::Text("%s", name.c_str());
}
ImGui::EndTable();
}
}
}

View File

@ -49,7 +49,7 @@ namespace ImGui {
void LeftLabel(const char* text) {
float vpos = ImGui::GetCursorPosY();
ImGui::SetCursorPosY(vpos + GImGui->Style.FramePadding.y);
ImGui::Text(text);
ImGui::Text("%s", text);
ImGui::SameLine();
ImGui::SetCursorPosY(vpos);
}
@ -57,4 +57,4 @@ namespace ImGui {
void FillWidth() {
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth());
}
}
}

View File

@ -433,7 +433,7 @@ namespace ImGui {
char buf[128];
ImGui::BeginTooltip();
ImGui::Text(name.c_str());
ImGui::Text("%s", name.c_str());
if (ImGui::IsKeyDown(GLFW_KEY_LEFT_CONTROL) || ImGui::IsKeyDown(GLFW_KEY_RIGHT_CONTROL)) {
ImGui::Separator();