Message ID | 20211110143747.32833-2-y.karadz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [1/5] kernel-shark: Silence a warning from 'cmake_clean.sh' | expand |
diff --git a/src/KsUtils.cpp b/src/KsUtils.cpp index 364c25d..a22c445 100644 --- a/src/KsUtils.cpp +++ b/src/KsUtils.cpp @@ -570,7 +570,7 @@ QMap<int, QVector<int>> parseTaskList(QString v_str) if (name.isEmpty()) continue; - for (auto const task: taskList) { + for (auto const &task: taskList) { if(name == task) ret[sd].append(pid); }
gcc 11.2.1 prints the following warning: KsUtils.cpp:573:41: warning: loop variable 'task' creates a copy from type 'const QString' [-Wrange-loop-construct] Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> --- src/KsUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)