aio: Avoid spurious coverity warning

Andres Freund <andres@anarazel.de>

Commit: 57dec20fd4691900fbe118699d32640fc538dc20
Author: Andres Freund <andres@anarazel.de>
Date: 2025-04-06T16:07:02Z
Releases: 18.0
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.vf@gmail.com>
Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/CAEudQApsKqd-s+fsUQ0OmxJAMHmBSXxrAz3dCs+uvqb3iRtjSw@mail.gmail.com

Files

PathChange+/−
src/backend/storage/buffer/bufmgr.c modified +2 −2

Discussion

  • AIO v2.0 213 messages · 2024-09-01 → 2025-07-29