[Lldb-commits] [lldb] [LLDB][NFC] Fix a cppcheck warning in lldb/source/Host/linux/Host.cpp (PR #94783)

Shivam Gupta via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 7 11:08:56 PDT 2024


https://github.com/xgupta created https://github.com/llvm/llvm-project/pull/94783

Fix #89710

>From 3fe606e8e9a9eb8df336ac48995eaa52b659aad1 Mon Sep 17 00:00:00 2001
From: Shivam Gupta <shivam98.tkg at gmail.com>
Date: Fri, 7 Jun 2024 23:37:08 +0530
Subject: [PATCH] [LLDB][NFC] Fix a cppcheck warning in
 lldb/source/Host/linux/Host.cpp

Fix #89710
---
 lldb/source/Host/linux/Host.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index c6490f2fc9e2f..8a65c46a52ea8 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -92,7 +92,7 @@ static bool GetStatusInfo(::pid_t Pid, ProcessInstanceInfo &ProcessInfo,
     return false;
   StatFields stat_fields;
   if (sscanf(Rest.data(),
-             "%d %s %c %d %d %d %d %d %u %lu %lu %lu %lu %lu %lu %ld %ld",
+             "%d %15s %c %d %d %d %d %d %u %lu %lu %lu %lu %lu %lu %ld %ld",
              &stat_fields.pid, stat_fields.comm, &stat_fields.state,
              &stat_fields.ppid, &stat_fields.pgrp, &stat_fields.session,
              &stat_fields.tty_nr, &stat_fields.tpgid, &stat_fields.flags,



More information about the lldb-commits mailing list