Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/extprotocol/gpextprotocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ DemoUri *ParseDemoUri(const char *uri_str)
/*
* parse protocol
*/
char *post_protocol = strstr(uri_str, "://");
const char *post_protocol = strstr(uri_str, "://");

if(!post_protocol)
{
Expand Down
4 changes: 2 additions & 2 deletions src/backend/access/external/url_curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ url_curl_fopen(char *url, bool forwrite, extvar_t *ev, CopyState pstate)
{
/* use empty message */
CURL_EASY_SETOPT(file->curl->handle, CURLOPT_POSTFIELDS, "");
CURL_EASY_SETOPT(file->curl->handle, CURLOPT_POSTFIELDSIZE, 0);
CURL_EASY_SETOPT(file->curl->handle, CURLOPT_POSTFIELDSIZE, 0L);

/* post away and check response, retry if failed (timeout or * connect error) */
gp_perform_backoff_and_check_response(file, easy_perform_work);
Expand Down Expand Up @@ -2015,7 +2015,7 @@ gp_proto0_write_done(URL_CURL_FILE *file)

/* use empty message */
CURL_EASY_SETOPT(file->curl->handle, CURLOPT_POSTFIELDS, "");
CURL_EASY_SETOPT(file->curl->handle, CURLOPT_POSTFIELDSIZE, 0);
CURL_EASY_SETOPT(file->curl->handle, CURLOPT_POSTFIELDSIZE, 0L);

/* post away! */
gp_perform_backoff_and_check_response(file, easy_perform_work);
Expand Down
24 changes: 24 additions & 0 deletions src/backend/cdb/cdbmutate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,14 @@ typedef struct ctid_inventory_context
Index relid;
} ctid_inventory_context;

static bool
ctid_inventory_walker(Node *node, ctid_inventory_context *inv);
static bool
ctid_inventory_walker_adapter(Node *node, void *inv)
{
return ctid_inventory_walker(node, (ctid_inventory_context *) inv);
}

static bool
ctid_inventory_walker(Node *node, ctid_inventory_context *inv)
{
Expand Down Expand Up @@ -2724,6 +2732,14 @@ typedef struct ParamWalkerContext
Bitmapset *scanrelids; /* Bitmapset for scanrelid */
} ParamWalkerContext;

static bool
param_walker(Node *node, ParamWalkerContext *context);
static bool
param_walker_adapter(Node *node, void *context)
{
return param_walker(node, (ParamWalkerContext *) context);
}

static bool
param_walker(Node *node, ParamWalkerContext *context)
{
Expand Down Expand Up @@ -2817,6 +2833,14 @@ rte_param_walker(List *rtable, ParamWalkerContext *context)
}
}

static bool
initplan_walker(Node *node, ParamWalkerContext *context);
static bool
initplan_walker_adapter(Node *node, void *context)
{
return initplan_walker(node, (ParamWalkerContext *) context);
}

static bool
initplan_walker(Node *node, ParamWalkerContext *context)
{
Expand Down
2 changes: 1 addition & 1 deletion src/backend/cdb/cdbplan.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ plan_tree_mutator(Node *node,
*
*/
static void
mutate_plan_fields(Plan *newplan, Plan *oldplan, Node *(*mutator) (), void *context)
mutate_plan_fields(Plan *newplan, Plan *oldplan, Node *(*mutator) (Node *, void *), void *context)
{
/*
* Scalar fields startup_cost total_cost plan_rows plan_width nParamExec
Expand Down
6 changes: 3 additions & 3 deletions src/backend/cdb/dispatcher/cdbgang.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ AllocateGang(CdbDispatcherState *ds, GangType type, List *segments)
bool
segment_failure_due_to_recovery(const char *error_message)
{
char *fatal = NULL,
const char *fatal = NULL,
*ptr = NULL;
int fatal_len = 0;

Expand Down Expand Up @@ -201,7 +201,7 @@ segment_failure_due_to_recovery(const char *error_message)
bool
segment_failure_due_to_missing_writer(const char *error_message)
{
char *fatal = NULL,
const char *fatal = NULL,
*ptr = NULL;
int fatal_len = 0;

Expand All @@ -223,7 +223,7 @@ segment_failure_due_to_missing_writer(const char *error_message)
bool
segment_failure_due_to_fault_injector(const char *error_message)
{
char *fatal = NULL,
const char *fatal = NULL,
*ptr = NULL;
int fatal_len = 0;

Expand Down
4 changes: 2 additions & 2 deletions src/backend/commands/resgroupcmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1625,8 +1625,8 @@ checkCpusetSyntax(const char *cpuset)
extern void
checkCpuSetByRole(const char *cpuset)
{
char *first = NULL;
char *last = NULL;
const char *first = NULL;
const char *last = NULL;

if (cpuset == NULL)
{
Expand Down
9 changes: 9 additions & 0 deletions src/backend/executor/execUtils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2407,6 +2407,15 @@ typedef struct MotionFinderContext
/*
* Walker to find a motion node that matches a particular motionID
*/
static bool
MotionFinderWalker(Plan *node,
void *context);
static bool
MotionFinderWalker_adapter(Node *node, void *context)
{
return MotionFinderWalker((Plan *) node, context);
}

static bool
MotionFinderWalker(Plan *node,
void *context)
Expand Down
5 changes: 5 additions & 0 deletions src/backend/optimizer/plan/setrefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2869,6 +2869,11 @@ cdb_extract_plan_dependencies(PlannerInfo *root, Plan *plan)
(void) cdb_extract_plan_dependencies_walker((Node *) plan, &context);
}

static bool
cdb_extract_plan_dependencies_walker(Node *node, cdb_extract_plan_dependencies_context *context);
static bool
cdb_extract_plan_dependencies_walker_adapter(Node *node, void *context);

static bool
cdb_extract_plan_dependencies_walker(Node *node, cdb_extract_plan_dependencies_context *context)
{
Expand Down
2 changes: 1 addition & 1 deletion src/backend/optimizer/util/predtest_valueset.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define INT32MAX (2147483647)
#define INT32MIN (-2147483648)

static HTAB *CreateNodeSetHashTable();
static HTAB *CreateNodeSetHashTable(MemoryContext memoryContext);
static void AddValue(PossibleValueSet *pvs, Const *valueToCopy);
static void RemoveValue(PossibleValueSet *pvs, Const *value);
static bool ContainsValue(PossibleValueSet *pvs, Const *value);
Expand Down
15 changes: 10 additions & 5 deletions src/backend/optimizer/util/walkers.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ void exec_init_plan_tree_base(plan_tree_base_prefix *base, PlannedStmt *stmt)
base->node = (Node*)stmt;
}

static bool walk_scan_node_fields(Scan *scan, bool (*walker) (), void *context);
static bool walk_join_node_fields(Join *join, bool (*walker) (), void *context);
static bool walk_scan_node_fields(Scan *scan, bool (*walker) (Node *, void *), void *context);
static bool walk_join_node_fields(Join *join, bool (*walker) (Node *, void *), void *context);


/* ----------------------------------------------------------------------- *
Expand All @@ -50,7 +50,7 @@ static bool walk_join_node_fields(Join *join, bool (*walker) (), void *context);
*/
bool
walk_plan_node_fields(Plan *plan,
bool (*walker) (),
bool (*walker) (Node *, void *),
void *context)
{
/* target list to be computed at this node */
Expand Down Expand Up @@ -94,7 +94,7 @@ walk_plan_node_fields(Plan *plan,
*/
bool
walk_scan_node_fields(Scan *scan,
bool (*walker) (),
bool (*walker) (Node *, void *),
void *context)
{
/* A Scan node is a kind of Plan node. */
Expand All @@ -119,7 +119,7 @@ walk_scan_node_fields(Scan *scan,
*/
bool
walk_join_node_fields(Join *join,
bool (*walker) (),
bool (*walker) (Node *, void *),
void *context)
{
/* A Join node is a kind of Plan node. */
Expand Down Expand Up @@ -637,6 +637,11 @@ List *extract_nodes_plan(Plan *pl, int nodeTag, bool descendIntoSubqueries)
return context.nodes;
}

static bool
extract_nodes_walker(Node *node, extract_context *context);
static bool
extract_nodes_walker_adapter(Node *node, void *context);

static bool
extract_nodes_walker(Node *node, extract_context *context)
{
Expand Down
2 changes: 1 addition & 1 deletion src/backend/utils/misc/fstream/fstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ static int glob_path(fstream_t *fs, const char *path)
while (*path == ' ')
path++;

p = strchr(path, ' ');
p = (char *)strchr(path, ' ');

if (p)
*p++ = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/utils/misc/uriparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ParseExternalTableUri(const char *uri_str)

else /* not recognized. treat it as a custom protocol */
{
char *post_protocol = strstr(uri_str, "://");
const char *post_protocol = strstr(uri_str, "://");

if(!post_protocol)
{
Expand Down
34 changes: 34 additions & 0 deletions src/backend/utils/resource_manager/memquota.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,16 @@ IsRootOperatorInGroup(Node *node)
* in a plan.
*/

static bool PolicyAutoPrelimWalker(Node *node, PolicyAutoContext *context);
static bool PolicyAutoAssignWalker(Node *node, PolicyAutoContext *context);
static bool PolicyEagerFreePrelimWalker(Node *node, PolicyEagerFreeContext *context);
static bool PolicyEagerFreeAssignWalker(Node *node, PolicyEagerFreeContext *context);

static bool PolicyAutoPrelimWalker_adapter(Node *node, void *context);
static bool PolicyAutoAssignWalker_adapter(Node *node, void *context);
static bool PolicyEagerFreePrelimWalker_adapter(Node *node, void *context);
static bool PolicyEagerFreeAssignWalker_adapter(Node *node, void *context);

static bool PolicyAutoPrelimWalker(Node *node, PolicyAutoContext *context)
{
if (node == NULL)
Expand Down Expand Up @@ -893,6 +903,30 @@ PolicyEagerFreeAssignWalker(Node *node, PolicyEagerFreeContext *context)
return result;
}

static bool
PolicyAutoPrelimWalker_adapter(Node *node, void *context)
{
return PolicyAutoPrelimWalker(node, (PolicyAutoContext *) context);
}

static bool
PolicyAutoAssignWalker_adapter(Node *node, void *context)
{
return PolicyAutoAssignWalker(node, (PolicyAutoContext *) context);
}

static bool
PolicyEagerFreePrelimWalker_adapter(Node *node, void *context)
{
return PolicyEagerFreePrelimWalker(node, (PolicyEagerFreeContext *) context);
}

static bool
PolicyEagerFreeAssignWalker_adapter(Node *node, void *context)
{
return PolicyEagerFreeAssignWalker(node, (PolicyEagerFreeContext *) context);
}

/*
* PolicyEagerFreeAssignOperatorMemoryKB
* Main entry point for memory quota OPTIMIZE. This function distributes the memory
Expand Down
6 changes: 3 additions & 3 deletions src/test/regress/pg_regress.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,8 @@ const char *
get_expectfile(const char *testname, const char *file, const char *default_expectfile)
{
char expectpath[MAXPGPATH];
char *file_type;
char *file_name;
const char *file_type;
const char *file_name;
char base_file[MAXPGPATH];
_resultmap *rm;
char buf[MAXPGPATH];
Expand Down Expand Up @@ -1085,7 +1085,7 @@ get_expectfile(const char *testname, const char *file, const char *default_expec
* up to the last slash.
*/
{
char *p = strrchr(default_expectfile, '/');
const char *p = strrchr(default_expectfile, '/');

if (!p)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/timezone/zic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2606,7 +2606,7 @@ doabbr(char *abbr, struct zone const *zp, char const *letters,
bool isdst, zic_t save, bool doquotes)
{
char *cp;
char *slashp;
const char *slashp;
size_t len;
char const *format = zp->z_format;

Expand Down
Loading