From: Pádraig Brady
Date: Sat, 8 Jul 2023 12:42:51 +0000 (+0100) Subject: maint: avoid static analysis failure for ignored dup2 return X-Git-Tag: v9.4~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f1cffe07ab0f0b4135a52d95f1689d7fc7f26c9;p=thirdparty%2Fcoreutils.git maint: avoid static analysis failure for ignored dup2 return * src/sort.c: We're ignoring failures from these calls, so do so explicitly to avoid static analysis issues as reported by coverity. --- diff --git a/src/sort.c b/src/sort.c index a7002d170b..06884dff35 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1025,9 +1025,9 @@ move_fd (int oldfd, int newfd) { if (oldfd != newfd) { - /* This should never fail for our usage. */ - dup2 (oldfd, newfd); - close (oldfd); + /* These should never fail for our usage. */ + ignore_value (dup2 (oldfd, newfd)); + ignore_value (close (oldfd)); } }