Skip to content

Commit 2f18e51

Browse files
committed
[lldb] Silence GCC warnings about format not being a string literal in LLDB_SCOPED_TIMER
Pass "%s" as the format string literal and LLVM_PRETTY_FUNCTION as argument to it. Differential Revision: https://reviews.llvm.org/D99120
1 parent e43e8e9 commit 2f18e51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/include/lldb/Utility/Timer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Timer {
7676

7777
#define LLDB_SCOPED_TIMER() \
7878
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
79-
::lldb_private::Timer _scoped_timer(_cat, LLVM_PRETTY_FUNCTION)
79+
::lldb_private::Timer _scoped_timer(_cat, "%s", LLVM_PRETTY_FUNCTION)
8080
#define LLDB_SCOPED_TIMERF(...) \
8181
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
8282
::lldb_private::Timer _scoped_timer(_cat, __VA_ARGS__)

0 commit comments

Comments
 (0)