From 11544df48b9f441af1f3cb2c28ea72db5c6eaf66 Mon Sep 17 00:00:00 2001 From: Sergey Morozov Date: Sat, 30 Apr 2022 23:10:26 +0300 Subject: [PATCH] Cppcheck: Escape error message format string Some shells try to expand {} otherwise. Fixes: QTCREATORBUG-27284 Change-Id: Ifd2bd7bc58f005339eebd150b98ced59395d24bc Reviewed-by: Reviewed-by: Christian Kandeler --- src/plugins/cppcheck/cppchecktool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cppcheck/cppchecktool.cpp b/src/plugins/cppcheck/cppchecktool.cpp index 9636443b0e3..6501ed583a4 100644 --- a/src/plugins/cppcheck/cppchecktool.cpp +++ b/src/plugins/cppcheck/cppchecktool.cpp @@ -118,7 +118,7 @@ void CppcheckTool::updateArguments() if (!m_options.unusedFunction && !m_options.customArguments.contains("-j ")) arguments.push_back("-j " + QString::number(QThread::idealThreadCount())); - arguments.push_back("--template={file},{line},{severity},{id},{message}"); + arguments.push_back("--template=\"{file},{line},{severity},{id},{message}\""); m_runner->reconfigure(m_options.binary, arguments.join(' ')); }