pgsql: Rework macro pgstat_is_ioop_tracked_in_bytes()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Rework macro pgstat_is_ioop_tracked_in_bytes()
Date: 2025-01-16 23:27:23
Message-ID: E1tYZGl-001zVA-NS@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Rework macro pgstat_is_ioop_tracked_in_bytes()

As written, it was triggering a compilation warning for old versions of
clang, as reported by buildfarm members ayu, batfish and demoiselle.
Forcing a cast with "unsigned int" should fix the warning.

While on it, the macro is moved to pgstat.h, closer to the declaration
of IOOp, per suggestion from Tom Lane.

Reported-by: Tom Lane
Reviewed-by: Bertrand Drouvot, Tom Lane, Nazir Bilal Yavuz
Discussion: https://postgr.es/m/1272824.1736961543@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7b6468cc9523d7d923487d212281af51f7f3dae2

Modified Files
--------------
src/backend/utils/activity/pgstat_io.c | 8 --------
src/include/pgstat.h | 4 ++++
2 files changed, 4 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Melanie Plageman 2025-01-16 23:44:36 pgsql: Add and use BitmapHeapScanDescData struct
Previous Message Nathan Bossart 2025-01-16 22:42:54 pgsql: Convert libpgport's pqsignal() to a void function.