pgsql: aio: Avoid spurious coverity warning

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: aio: Avoid spurious coverity warning
Date: 2025-04-06 16:12:00
Message-ID: E1u1SbI-002z1o-0f@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

aio: Avoid spurious coverity warning

PgAioResult.result is never accessed in the relevant path, but coverity
complains about an uninitialized access anyway. So just zero-initialize the
whole thing. While at it, reduce the scope of the variable.

Reported-by: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Reviewed-by: Noah Misch <noah(at)leadboat(dot)com>
Discussion: https://postgr.es/m/CAEudQApsKqd-s+fsUQ0OmxJAMHmBSXxrAz3dCs+uvqb3iRtjSw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/57dec20fd4691900fbe118699d32640fc538dc20

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2025-04-06 16:16:41 pgsql: Fix unintentional 'NULL' string literal in pg_upgrade.
Previous Message Tom Lane 2025-04-06 15:57:30 pgsql: Fix memory leaks in px_crypt_shacrypt().