mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-02 02:32:27 +00:00
Fix some static analysis issues
This commit is contained in:
parent
fb54604b31
commit
f147d3dde9
30 changed files with 375 additions and 266 deletions
|
@ -75,7 +75,10 @@ FILE *popen(const char *cmdline, const char *mode) {
|
|||
if ((f = fdopen(pipefds[dir], mode))) {
|
||||
switch ((pid = fork())) {
|
||||
case 0:
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
|
||||
unassert(dup2(pipefds[!dir], !dir) == !dir);
|
||||
#pragma GCC diagnostic pop
|
||||
// we can't rely on cloexec because cocmd builtins don't execve
|
||||
if (pipefds[0] != !dir)
|
||||
unassert(!close(pipefds[0]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue