diff options
author | Michal Gorny <mgorny@gentoo.org> | 2019-02-26 20:14:07 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2019-02-26 20:14:07 +0000 |
commit | 42d9cd2d350df895f2e78de9a134a26526cc86cb (patch) | |
tree | 78933822c78f8ddfc80148921b99ea36181d52f3 | |
parent | 8fda7e15e6249d675b6852c60ab191b3e3cda8ba (diff) | |
download | bcm5719-llvm-42d9cd2d350df895f2e78de9a134a26526cc86cb.tar.gz bcm5719-llvm-42d9cd2d350df895f2e78de9a134a26526cc86cb.zip |
[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
-rw-r--r-- | lldb/unittests/Utility/TimerTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/unittests/Utility/TimerTest.cpp b/lldb/unittests/Utility/TimerTest.cpp index 9605416198d..28d8d050b3e 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; |