mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
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.
This commit is contained in:
@ -515,8 +515,8 @@ spg_box_quad_inner_consistent(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
for (quadrant = 0; quadrant < in->nNodes; quadrant++)
|
for (quadrant = 0; quadrant < in->nNodes; quadrant++)
|
||||||
{
|
{
|
||||||
bool flag;
|
|
||||||
RectBox *next_rect_box = nextRectBox(rect_box, centroid, quadrant);
|
RectBox *next_rect_box = nextRectBox(rect_box, centroid, quadrant);
|
||||||
|
bool flag = true;
|
||||||
|
|
||||||
for (i = 0; i < in->nkeys; i++)
|
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);
|
spgLeafConsistentIn *in = (spgLeafConsistentIn *) PG_GETARG_POINTER(0);
|
||||||
spgLeafConsistentOut *out = (spgLeafConsistentOut *) PG_GETARG_POINTER(1);
|
spgLeafConsistentOut *out = (spgLeafConsistentOut *) PG_GETARG_POINTER(1);
|
||||||
Datum leaf = in->leafDatum;
|
Datum leaf = in->leafDatum;
|
||||||
bool flag;
|
bool flag = true;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* All tests are exact. */
|
/* All tests are exact. */
|
||||||
|
Reference in New Issue
Block a user