diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-30 13:36:18 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-30 13:36:18 -0400 |
commit | 818e59373625d194bdec89631b661c4355d15f13 (patch) | |
tree | c16bb580559dd8c71d36fe9b266e6d11b147af90 /src/backend/utils/adt/geo_spgist.c | |
parent | 2d02a856e8331329121ac2fa2c0b5dab0d106ca0 (diff) | |
download | postgresql-818e59373625d194bdec89631b661c4355d15f13.tar.gz postgresql-818e59373625d194bdec89631b661c4355d15f13.zip |
Suppress uninitialized-variable warnings.
My compiler doesn't like the lack of initialization of "flag", and
I think it's right: if there were zero keys we'd have an undefined
result. The AND of zero items is TRUE, so initialize to TRUE.
Diffstat (limited to 'src/backend/utils/adt/geo_spgist.c')
-rw-r--r-- | src/backend/utils/adt/geo_spgist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/geo_spgist.c b/src/backend/utils/adt/geo_spgist.c index 7604f1e8eae..cd9db030dcf 100644 --- a/src/backend/utils/adt/geo_spgist.c +++ b/src/backend/utils/adt/geo_spgist.c @@ -515,8 +515,8 @@ spg_box_quad_inner_consistent(PG_FUNCTION_ARGS) for (quadrant = 0; quadrant < in->nNodes; quadrant++) { - bool flag; RectBox *next_rect_box = nextRectBox(rect_box, centroid, quadrant); + bool flag = true; for (i = 0; i < in->nkeys; i++) { @@ -609,7 +609,7 @@ spg_box_quad_leaf_consistent(PG_FUNCTION_ARGS) spgLeafConsistentIn *in = (spgLeafConsistentIn *) PG_GETARG_POINTER(0); spgLeafConsistentOut *out = (spgLeafConsistentOut *) PG_GETARG_POINTER(1); Datum leaf = in->leafDatum; - bool flag; + bool flag = true; int i; /* All tests are exact. */ |