CBL-Mariner/SPECS/lldb/0001-Silence-GCC-warnings-a...

31 строка
1.2 KiB
Diff

From 8013f48ece44a510db4b73b275a99cba00b213ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Tue, 23 Mar 2021 00:08:11 +0200
Subject: [PATCH] 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
---
include/lldb/Utility/Timer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/lldb/Utility/Timer.h b/include/lldb/Utility/Timer.h
index edc064b..32422b3 100644
--- a/include/lldb/Utility/Timer.h
+++ b/include/lldb/Utility/Timer.h
@@ -76,7 +76,7 @@ private:
#define LLDB_SCOPED_TIMER() \
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
- ::lldb_private::Timer _scoped_timer(_cat, LLVM_PRETTY_FUNCTION)
+ ::lldb_private::Timer _scoped_timer(_cat, "%s", LLVM_PRETTY_FUNCTION)
#define LLDB_SCOPED_TIMERF(...) \
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
::lldb_private::Timer _scoped_timer(_cat, __VA_ARGS__)
--
2.17.1