mirror of
https://https.git.savannah.gnu.org/git/patch.git
synced 2026-01-27 09:54:55 +00:00
explicitly ignore close return value to placate static analyzers
* src/util.c: Include "ignore-value.h". (ask): Use ignore_value to tell tools that yes, we really do mean to ignore any close failure on this error path. * bootstrap.conf (gnulib_modules): Add ignore-value.
This commit is contained in:
parent
6526aec61f
commit
bb2fef06eb
@ -34,6 +34,7 @@ gettime
|
||||
gitlog-to-changelog
|
||||
git-version-gen
|
||||
hash
|
||||
ignore-value
|
||||
lchmod
|
||||
lstat
|
||||
maintainer-makefile
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
#include <xalloc.h>
|
||||
|
||||
#include <getdate.h>
|
||||
#include "ignore-value.h"
|
||||
|
||||
#include <signal.h>
|
||||
#if !defined SIGCHLD && defined SIGCLD
|
||||
@ -1007,7 +1008,7 @@ ask (char const *format, ...)
|
||||
{
|
||||
perror ("tty read");
|
||||
fflush (stderr);
|
||||
close (ttyfd);
|
||||
ignore_value (close (ttyfd));
|
||||
ttyfd = -1;
|
||||
r = 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user