From 25b2aba0c3a501e2af9579f1b629f155544935db Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Fri, 20 Jan 2023 21:16:47 -0800 Subject: Zero initialize uses of instr_time about to trigger compiler warnings These are all not necessary from a correctness POV. However, in the near future instr_time will be simplified to an int64, at which point gcc would otherwise start to warn about the changed places. Reviewed-by: Tom Lane Discussion: https://postgr.es/m/20230116023639.rn36vf6ajqmfciua@awork3.anarazel.de --- src/backend/storage/file/buffile.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/backend/storage/file/buffile.c') diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c index c5464b6aa62..0a51624df3b 100644 --- a/src/backend/storage/file/buffile.c +++ b/src/backend/storage/file/buffile.c @@ -446,6 +446,8 @@ BufFileLoadBuffer(BufFile *file) if (track_io_timing) INSTR_TIME_SET_CURRENT(io_start); + else + INSTR_TIME_SET_ZERO(io_start); /* * Read whatever we can get, up to a full bufferload. @@ -525,6 +527,8 @@ BufFileDumpBuffer(BufFile *file) if (track_io_timing) INSTR_TIME_SET_CURRENT(io_start); + else + INSTR_TIME_SET_ZERO(io_start); bytestowrite = FileWrite(thisfile, file->buffer.data + wpos, -- cgit v1.2.3