From 42d9cd2d350df895f2e78de9a134a26526cc86cb Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Tue, 26 Feb 2019 20:14:07 +0000 Subject: [PATCH] [lldb] [unittests] Use non-empty format string for Timer() Pass dummy '.' as format string for Timer() rather than an empty string, in order to silence gcc warnings about empty format string (-Wformat-zero-length). The actual format string is irrelevant to the test in question. Differential Revision: https://reviews.llvm.org/D58680 llvm-svn: 354922 --- lldb/unittests/Utility/TimerTest.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lldb/unittests/Utility/TimerTest.cpp b/lldb/unittests/Utility/TimerTest.cpp index 9605416..28d8d05 100644 --- a/lldb/unittests/Utility/TimerTest.cpp +++ b/lldb/unittests/Utility/TimerTest.cpp @@ -17,7 +17,7 @@ TEST(TimerTest, CategoryTimes) { Timer::ResetCategoryTimes(); { static Timer::Category tcat("CAT1"); - Timer t(tcat, ""); + Timer t(tcat, "."); std::this_thread::sleep_for(std::chrono::milliseconds(10)); } StreamString ss; @@ -32,10 +32,10 @@ TEST(TimerTest, CategoryTimesNested) { Timer::ResetCategoryTimes(); { static Timer::Category tcat1("CAT1"); - Timer t1(tcat1, ""); + Timer t1(tcat1, "."); std::this_thread::sleep_for(std::chrono::milliseconds(10)); // Explicitly testing the same category as above. - Timer t2(tcat1, ""); + Timer t2(tcat1, "."); std::this_thread::sleep_for(std::chrono::milliseconds(10)); } StreamString ss; @@ -52,10 +52,10 @@ TEST(TimerTest, CategoryTimes2) { Timer::ResetCategoryTimes(); { static Timer::Category tcat1("CAT1"); - Timer t1(tcat1, ""); + Timer t1(tcat1, "."); std::this_thread::sleep_for(std::chrono::milliseconds(100)); static Timer::Category tcat2("CAT2"); - Timer t2(tcat2, ""); + Timer t2(tcat2, "."); std::this_thread::sleep_for(std::chrono::milliseconds(10)); } StreamString ss; -- 2.7.4