Merge pull request #450 from citusdata/unused-variables

Fix various unused variable warnings

cr: @jasonmp85
pull/445/head
Jason Petersen 2016-04-19 12:44:38 -06:00
commit 991f73c4f4
7 changed files with 7 additions and 7 deletions

View File

@ -486,7 +486,7 @@ MultiClientQueryStatus(int32 connectionId)
{
PGconn *connection = NULL;
PGresult *result = NULL;
int tupleCount = 0;
int tupleCount PG_USED_FOR_ASSERTS_ONLY = 0;
bool copyResults = false;
ConnStatusType connStatusType = CONNECTION_OK;
ExecStatusType resultStatus = PGRES_COMMAND_OK;

View File

@ -305,7 +305,7 @@ FindRandomNodeNotInList(HTAB *WorkerNodesHash, List *currentNodeList)
WorkerNode *workerNode = NULL;
HASH_SEQ_STATUS status;
uint32 workerNodeCount = 0;
uint32 currentNodeCount = 0;
uint32 currentNodeCount PG_USED_FOR_ASSERTS_ONLY = 0;
bool lookForWorkerNode = true;
uint32 workerPosition = 0;
uint32 workerIndex = 0;

View File

@ -102,7 +102,6 @@ ErrorIfQueryNotSupported(Query *queryTree)
Oid distributedTableId = ExtractFirstDistributedTableId(queryTree);
uint32 rangeTableId = 1;
Var *partitionColumn = PartitionColumn(distributedTableId, rangeTableId);
char partitionMethod = PartitionMethod(distributedTableId);
List *rangeTableList = NIL;
ListCell *rangeTableCell = NULL;
bool hasValuesScan = false;

View File

@ -750,7 +750,7 @@ BestJoinOrder(List *candidateJoinOrders)
List *bestJoinOrder = NULL;
uint32 ruleTypeIndex = 0;
uint32 highestValidIndex = JOIN_RULE_LAST - 1;
uint32 candidateCount = 0;
uint32 candidateCount PG_USED_FOR_ASSERTS_ONLY = 0;
/*
* We start with the highest ranking rule type (cartesian product), and walk

View File

@ -1560,7 +1560,7 @@ ApplyJoinRule(MultiNode *leftNode, MultiNode *rightNode, JoinRuleType ruleType,
List *applicableJoinClauses = NIL;
List *leftTableIdList = OutputTableIdList(leftNode);
List *rightTableIdList = OutputTableIdList(rightNode);
int rightTableIdCount = 0;
int rightTableIdCount PG_USED_FOR_ASSERTS_ONLY = 0;
uint32 rightTableId = 0;
rightTableIdCount = list_length(rightTableIdList);

View File

@ -1724,7 +1724,8 @@ BuildMapMergeJob(Query *jobQuery, List *dependedJobList, Var *partitionKey,
SortedShardIntervalArray(shardIntervalList);
/* this join-type currently doesn't work for hash partitioned tables */
char basePartitionMethod = PartitionMethod(baseRelationId);
char basePartitionMethod PG_USED_FOR_ASSERTS_ONLY =
PartitionMethod(baseRelationId);
Assert(basePartitionMethod != DISTRIBUTE_BY_HASH);
mapMergeJob->partitionType = RANGE_PARTITION_TYPE;

View File

@ -368,7 +368,7 @@ CreateTaskTable(StringInfo schemaName, StringInfo relationName,
CreateStmt *createStatement = NULL;
RangeVar *relation = NULL;
List *columnDefinitionList = NIL;
Oid relationId = InvalidOid;
Oid relationId PG_USED_FOR_ASSERTS_ONLY = InvalidOid;
#if (PG_VERSION_NUM >= 90500)
ObjectAddress relationObject;
#endif