diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2025-07-29 09:42:22 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2025-07-29 09:42:22 -0400 |
commit | b9ebb92bcb6e0db111deacfbc14f470ce1b3ed8d (patch) | |
tree | 4587ad6c7cb8e0f0597397aa1b59ff67bfc4dd01 /contrib/postgres_fdw/postgres_fdw.c | |
parent | 1d1612aec7688139e1a5506df1366b4b6a69605d (diff) | |
download | postgresql-b9ebb92bcb6e0db111deacfbc14f470ce1b3ed8d.tar.gz postgresql-b9ebb92bcb6e0db111deacfbc14f470ce1b3ed8d.zip |
Suppress uninitialized-variable warning.
In the wake of commit 80aa9848b, a few compilers think that
postgresAcquireSampleRowsFunc's "reltuples" might be used
uninitialized. The logic is visibly correct, both before
and after that change; presumably what happened here is that
the previous presence of a setjmp() in the function stopped
them from attempting any flow analysis at all. Add a dummy
initialization to silence the warning.
Reported-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAExHW5tkerCufA_F6oct5dMJ61N+yVrVgYXL7M8dD-5_zXjrDw@mail.gmail.com
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 25b287be069..9d266b3e2b1 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -5018,7 +5018,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel, int server_version_num; PgFdwSamplingMethod method = ANALYZE_SAMPLE_AUTO; /* auto is default */ double sample_frac = -1.0; - double reltuples; + double reltuples = -1.0; unsigned int cursor_number; StringInfoData sql; PGresult *res; |