aio: Avoid spurious coverity warning
authorAndres Freund <andres@anarazel.de>
Fri, 4 Apr 2025 19:15:39 +0000 (15:15 -0400)
committerAndres Freund <andres@anarazel.de>
Sun, 6 Apr 2025 16:07:02 +0000 (12:07 -0400)
commit57dec20fd4691900fbe118699d32640fc538dc20
tree0a06038dd8d608e5034dcf53bd4adabebb713ed9
parent8ab6ef2bb8d9a00d205742932eb0b6daf62b34e0
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
src/backend/storage/buffer/bufmgr.c