mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Clean up most -Wunused-but-set-variable warnings from gcc 4.6
This warning is new in gcc 4.6 and part of -Wall. This patch cleans up most of the noise, but there are some still warnings that are trickier to remove.
This commit is contained in:
@ -1081,7 +1081,6 @@ patternsel(PG_FUNCTION_ARGS, Pattern_Type ptype, bool negate)
|
||||
List *args = (List *) PG_GETARG_POINTER(2);
|
||||
int varRelid = PG_GETARG_INT32(3);
|
||||
VariableStatData vardata;
|
||||
Node *variable;
|
||||
Node *other;
|
||||
bool varonleft;
|
||||
Datum constval;
|
||||
@ -1123,7 +1122,6 @@ patternsel(PG_FUNCTION_ARGS, Pattern_Type ptype, bool negate)
|
||||
ReleaseVariableStats(vardata);
|
||||
return result;
|
||||
}
|
||||
variable = (Node *) linitial(args);
|
||||
|
||||
/*
|
||||
* If the constant is NULL, assume operator is strict and return zero, ie,
|
||||
@ -2291,7 +2289,6 @@ eqjoinsel_semi(Oid operator,
|
||||
double nd1;
|
||||
double nd2;
|
||||
Form_pg_statistic stats1 = NULL;
|
||||
Form_pg_statistic stats2 = NULL;
|
||||
bool have_mcvs1 = false;
|
||||
Datum *values1 = NULL;
|
||||
int nvalues1 = 0;
|
||||
@ -2321,7 +2318,6 @@ eqjoinsel_semi(Oid operator,
|
||||
|
||||
if (HeapTupleIsValid(vardata2->statsTuple))
|
||||
{
|
||||
stats2 = (Form_pg_statistic) GETSTRUCT(vardata2->statsTuple);
|
||||
have_mcvs2 = get_attstatsslot(vardata2->statsTuple,
|
||||
vardata2->atttype,
|
||||
vardata2->atttypmod,
|
||||
@ -4415,7 +4411,6 @@ get_variable_range(PlannerInfo *root, VariableStatData *vardata, Oid sortop,
|
||||
Datum tmin = 0;
|
||||
Datum tmax = 0;
|
||||
bool have_data = false;
|
||||
Form_pg_statistic stats;
|
||||
int16 typLen;
|
||||
bool typByVal;
|
||||
Datum *values;
|
||||
@ -4439,7 +4434,6 @@ get_variable_range(PlannerInfo *root, VariableStatData *vardata, Oid sortop,
|
||||
/* no stats available, so default result */
|
||||
return false;
|
||||
}
|
||||
stats = (Form_pg_statistic) GETSTRUCT(vardata->statsTuple);
|
||||
|
||||
get_typlenbyval(vardata->atttype, &typLen, &typByVal);
|
||||
|
||||
|
Reference in New Issue
Block a user