mirror of
https://github.com/postgres/postgres.git
synced 2025-10-09 00:05:07 -04:00
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
This commit is contained in:
parent
1d1612aec7
commit
b9ebb92bcb
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user