Skip to content

Commit b1b8682

Browse files
committed
Suppress more compiler warnings in new pgstats code.
Per buildfarm, we didn't get rid of quite all of the -Wtautological-constant-out-of-range-compare warnings in pgstat_io.c. Discussion: https://postgr.es/m/20520.1677435600@sss.pgh.pa.us
1 parent 019f862 commit b1b8682

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/utils/activity/pgstat_io.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ pgstat_bktype_io_stats_valid(PgStat_BktypeIO *backend_io,
6565
void
6666
pgstat_count_io_op(IOObject io_object, IOContext io_context, IOOp io_op)
6767
{
68-
Assert(io_object < IOOBJECT_NUM_TYPES);
69-
Assert(io_context < IOCONTEXT_NUM_TYPES);
70-
Assert(io_op < IOOP_NUM_TYPES);
68+
Assert((unsigned int) io_object < IOOBJECT_NUM_TYPES);
69+
Assert((unsigned int) io_context < IOCONTEXT_NUM_TYPES);
70+
Assert((unsigned int) io_op < IOOP_NUM_TYPES);
7171
Assert(pgstat_tracks_io_op(MyBackendType, io_object, io_context, io_op));
7272

7373
PendingIOStats.data[io_object][io_context][io_op]++;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy