Skip to content

Commit

Permalink
Merge pull request #4721 from morxa/format-security-2
Browse files Browse the repository at this point in the history
Fix format-security warnings (again)
  • Loading branch information
dorodnic authored Aug 27, 2019
2 parents 8307154 + 0ef75da commit f700d9a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMake/unix_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ message(STATUS "Setting Unix configurations")
macro(os_set_flags)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -pedantic -g -D_BSD_SOURCE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pedantic -g -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-multichar -Wsequence-point -Wformat-security")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-multichar -Wsequence-point -Wformat -Wformat-security")

execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE MACHINE)
if(${MACHINE} MATCHES "arm-linux-gnueabihf")
Expand Down
6 changes: 3 additions & 3 deletions common/model-views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ namespace rs2
ImColor(alpha(sensor_bg, 0.1f)));

ImGui::PushStyleColor(ImGuiCol_Text, redish);
ImGui::Text(text);
ImGui::Text("%s", text);
ImGui::PopStyleColor();

line_y += ImGui::GetTextLineHeight() + 3;
Expand All @@ -2425,13 +2425,13 @@ namespace rs2
ImColor(alpha(sensor_bg, 0.1f)));

ImGui::PushStyleColor(ImGuiCol_Text, white);
ImGui::Text(text.c_str()); ImGui::SameLine();
ImGui::Text("%s", text.c_str()); ImGui::SameLine();

if (at.description != "")
{
if (ImGui::IsItemHovered())
{
ImGui::SetTooltip(at.description.c_str());
ImGui::SetTooltip("%s", at.description.c_str());
}
}

Expand Down
2 changes: 1 addition & 1 deletion common/notifications.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ namespace rs2
std::string txt = to_string() << "librealsense " << RS2_API_VERSION_STR << "!";

ImGui::PushStyleColor(ImGuiCol_Text, alpha(white, 1.f - t));
ImGui::Text(txt.c_str());
ImGui::Text("%s", txt.c_str());
ImGui::PopStyleColor();
ImGui::PopFont();

Expand Down

0 comments on commit f700d9a

Please sign in to comment.