agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix for loop variables used with lengthof
Date: Sat, 11 Jul 2026 12:49:20 +0000
Message-ID: <E1wiX8y-000ayv-0F@gemulon.postgresql.org> (raw)
Fix for loop variables used with lengthof
lengthof returns type size_t, but most for loops used int as a loop
variable. Fix that. This avoids possible warnings about
signed/unsigned mismatches under higher warning levels. (The compiler
will likely optimize these loops beyond recognition, so this shouldn't
affect the generated code much.)
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/d639aede-209f-412b-927a-d38d4848b370%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5f14f82280db4b0e49d774362854c9d362106484
Modified Files
--------------
contrib/dblink/dblink.c | 3 +--
src/backend/access/heap/heapam.c | 2 +-
src/backend/access/transam/parallel.c | 4 +---
src/backend/bootstrap/bootstrap.c | 2 +-
src/backend/catalog/objectaddress.c | 11 +++--------
src/backend/commands/typecmds.c | 3 +--
src/backend/main/main.c | 2 +-
src/backend/postmaster/bgworker.c | 4 +---
src/backend/postmaster/datachecksum_state.c | 4 ++--
src/backend/replication/logical/conflict.c | 2 +-
src/backend/utils/adt/amutils.c | 4 +---
src/backend/utils/adt/jsonb.c | 3 +--
src/backend/utils/adt/jsonpath_exec.c | 3 +--
.../utf8_and_iso8859/utf8_and_iso8859.c | 6 ++----
.../conversion_procs/utf8_and_win/utf8_and_win.c | 6 ++----
src/bin/initdb/initdb.c | 3 +--
src/bin/pg_dump/pg_dump.c | 2 +-
src/bin/pgbench/pgbench.c | 18 ++++++-----------
src/bin/psql/command.c | 6 ++----
src/bin/psql/tab-complete.in.c | 2 +-
src/common/unicode_norm.c | 4 +---
src/interfaces/libpq/fe-auth.c | 2 +-
src/interfaces/libpq/fe-connect.c | 23 +++++++++++++---------
src/pl/plpgsql/src/pl_scanner.c | 4 +---
src/port/pg_localeconv_r.c | 6 +++---
src/port/win32error.c | 4 +---
src/port/win32ntdll.c | 2 +-
src/test/modules/oauth_validator/validator.c | 2 +-
src/test/modules/test_escape/test_escape.c | 4 ++--
src/test/modules/test_integerset/test_integerset.c | 2 +-
src/test/modules/test_radixtree/test_radixtree.c | 2 +-
src/test/regress/regress.c | 2 +-
src/timezone/zic.c | 2 +-
33 files changed, 60 insertions(+), 89 deletions(-)
Message-ID: <E1wiX8y-000ayv-0F@gemulon.postgresql.org>
Permalink: ../E1wiX8y-000ayv-0F@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wiX8y-000ayv-0F@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix for loop variables used with lengthof
In-Reply-To: <E1wiX8y-000ayv-0F@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox