pgsql: Fix "ignoring return value" complaints from commit 96d1f423f9

From: Joe Conway <mail(at)joeconway(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix "ignoring return value" complaints from commit 96d1f423f9
Date: 2020-07-04 17:48:26
Message-ID: E1jrmH4-0003PU-2S@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix "ignoring return value" complaints from commit 96d1f423f9

The cfbot and some BF animals are complaining about the previous
read_binary_file commit because of ignoring return value of ‘fread’.
So let's make everyone happy by testing the return value even though
not strictly needed.

Reported by Justin Pryzby, and suggested patch by Tom Lane. Backpatched
to v11 same as the previous commit.

Reported-By: Justin Pryzby
Reviewed-By: Tom Lane
Discussion: https://postgr.es/m/flat/969b8d82-5bb2-5fa8-4eb1-f0e685c5d736%40joeconway.com
Backpatch-through: 11

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1d05627fcf54b26e0cbd7527f9858f165d117813

Modified Files
--------------
src/backend/utils/adt/genfile.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Joe Conway 2020-07-04 17:48:29 pgsql: Fix "ignoring return value" complaints from commit 96d1f423f9
Previous Message Joe Conway 2020-07-04 10:30:20 pgsql: Read until EOF vice stat-reported size in read_binary_file