Enable Werror for all warnings

Changes to ruleutils match changes made upstream to silence gcc fallthrough warnings
pull/2757/head
Philip Dubé 2019-06-17 20:32:58 +02:00 committed by Jason Petersen
parent 04abc1137f
commit 4bfcf5b665
7 changed files with 19 additions and 5 deletions

View File

@ -1288,6 +1288,7 @@ ConversionPathForTypes(Oid inputType, Oid destType, CopyCoercionData *result)
case COERCION_PATH_NONE:
{
ereport(ERROR, (errmsg("cannot cast %d to %d", inputType, destType)));
return;
}
case COERCION_PATH_ARRAYCOERCE:
@ -1308,10 +1309,10 @@ ConversionPathForTypes(Oid inputType, Oid destType, CopyCoercionData *result)
ereport(ERROR, (errmsg("can not run query which uses an implicit coercion"
" between array types")));
}
/* fallthrough */
}
/* fallthrough */
case COERCION_PATH_COERCEVIAIO:
{
result->coercionType = COERCION_PATH_COERCEVIAIO;

View File

@ -273,7 +273,6 @@ ReturnTupleFromTuplestore(CitusScanState *scanState)
void
LoadTuplesIntoTupleStore(CitusScanState *citusScanState, Job *workerJob)
{
CustomScanState customScanState = citusScanState->customScanState;
List *workerTaskList = workerJob->taskList;
TupleDesc tupleDescriptor = NULL;
ListCell *workerTaskCell = NULL;

View File

@ -29,6 +29,15 @@
#include "catalog/namespace.h"
#include "catalog/pg_class.h"
#include "catalog/pg_constraint.h"
#if PG_VERSION_NUM < 110000
/* pg_constraint_fn.h is gone in postgres 11,
* get_relation_constraint_oid is merged into pg_constraint.h then
*/
#include "catalog/pg_constraint_fn.h"
#endif
#include "distributed/commands.h"
#include "distributed/metadata_cache.h"
#include "distributed/relay_utility.h"

View File

@ -83,6 +83,8 @@ PartiallyEvaluateExpression(Node *expression, PlanState *planState)
}
}
/* fallthrough */
case T_FuncExpr:
case T_OpExpr:
case T_DistinctExpr:

View File

@ -625,17 +625,20 @@ LookupNodeForGroup(int32 groupId)
{
ereport(ERROR, (errmsg("node group %d does not have a primary node",
groupId)));
return NULL;
}
case USE_SECONDARY_NODES_ALWAYS:
{
ereport(ERROR, (errmsg("node group %d does not have a secondary node",
groupId)));
return NULL;
}
default:
{
ereport(FATAL, (errmsg("unrecognized value for use_secondary_nodes")));
return NULL;
}
}
}

View File

@ -4528,8 +4528,8 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags)
return false;
}
/* else do the same stuff as for T_SubLink et al. */
/* FALL THROUGH */
}
/* FALLTHROUGH */
case T_SubLink:
case T_NullTest:

View File

@ -4530,8 +4530,8 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags)
return false;
}
/* else do the same stuff as for T_SubLink et al. */
/* FALL THROUGH */
}
/* FALLTHROUGH */
case T_SubLink:
case T_NullTest: