diff options
author | Jim Meyering <meyering@redhat.com> | 2011-05-24 13:29:46 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-05-25 16:47:33 +0200 |
commit | bb2fef06eb52eefe0d72d6e536cd928565dcdcd0 (patch) | |
tree | bb7d4022991a932390d46c7eadf76c4864f8c000 | |
parent | 6526aec61f0bd6ea49a412cd7898d0c0cf90092b (diff) | |
download | patch-bb2fef06eb52eefe0d72d6e536cd928565dcdcd0.tar.gz |
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.
-rw-r--r-- | bootstrap.conf | 1 | ||||
-rw-r--r-- | src/util.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index 607ad1a..a460c57 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -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; } |