summaryrefslogtreecommitdiffstats
path: root/OpenFilesScreen.c
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2022-05-17 19:15:37 +0800
committerExplorer09 <explorer09@gmail.com>2022-05-19 18:42:44 +0800
commit44091705dbdb2e3751c03e4935b1e5a7cf169241 (patch)
tree450068f9dbb71b4e9914d30f25aae6755353ff76 /OpenFilesScreen.c
parent87793b85552de1a67eb7a779c745ed02d04322bf (diff)
Use of NULL in execlp() must have a pointer cast.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Diffstat (limited to 'OpenFilesScreen.c')
-rw-r--r--OpenFilesScreen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenFilesScreen.c b/OpenFilesScreen.c
index 2d191692..787e17b9 100644
--- a/OpenFilesScreen.c
+++ b/OpenFilesScreen.c
@@ -120,7 +120,9 @@ static OpenFiles_ProcessData* OpenFilesScreen_getProcessData(pid_t pid) {
close(fdnull);
char buffer[32] = {0};
xSnprintf(buffer, sizeof(buffer), "%d", pid);
- execlp("lsof", "lsof", "-P", "-o", "-p", buffer, "-F", NULL);
+ // Use of NULL in variadic functions must have a pointer cast.
+ // The NULL constant is not required by standard to have a pointer type.
+ execlp("lsof", "lsof", "-P", "-o", "-p", buffer, "-F", (char *)NULL);
exit(127);
}
close(fdpair[1]);

© 2014-2024 Faster IT GmbH | imprint | privacy policy