Skip to content

Commit

Permalink
misc unused var cleanups
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Naughton <naughtont@ornl.gov>
  • Loading branch information
naughtont3 authored and rhc54 committed Oct 13, 2022
1 parent f80a882 commit 9c48d62
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 13 deletions.
8 changes: 5 additions & 3 deletions src/mca/schizo/ompi/schizo_ompi.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static void set_classpath_jar_file(prte_pmix_app_t *app, int index, char *jarfil
static int setup_app(prte_pmix_app_t *app)
{
bool found;
int i,n,java_pos,rc;
int i,rc;
char *value;

/* if this is a Java application, we have a bit more work to do. Such
Expand Down Expand Up @@ -584,10 +584,9 @@ static int parse_cli(char **argv, pmix_cli_result_t *results,
static int convert_deprecated_cli(pmix_cli_result_t *results,
bool silent)
{
char *option, *p1, *p2, *tmp, *tmp2, *output, *modifier;
char *option, *p1, *p2, *tmp, *tmp2, *output;
int rc = PRTE_SUCCESS;
pmix_cli_item_t *opt, *nxt;
prte_value_t *pval, val;
bool warn;

if (silent) {
Expand Down Expand Up @@ -1486,6 +1485,7 @@ static int parse_env(char **srcenv, char ***dstenv,
char **envlist = NULL, **envtgt = NULL;
pmix_cli_item_t *opt;
int i, j, rc;
PRTE_HIDE_UNUSED_PARAMS(srcenv);

pmix_output_verbose(1, prte_schizo_base_framework.framework_output,
"%s schizo:ompi: parse_env",
Expand Down Expand Up @@ -2188,11 +2188,13 @@ static int set_default_ranking(prte_job_t *jdata,
static void job_info(pmix_cli_result_t *results,
void *jobinfo)
{
PRTE_HIDE_UNUSED_PARAMS(results, jobinfo);
return;
}

static int set_default_rto(prte_job_t *jdata,
prte_rmaps_options_t *options)
{
PRTE_HIDE_UNUSED_PARAMS(options);
return prte_state_base_set_runtime_options(jdata, NULL);
}
9 changes: 5 additions & 4 deletions src/mca/schizo/prte/schizo_prte.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,14 @@ static int parse_cli(char **argv, pmix_cli_result_t *results,
}
}
return PRTE_SUCCESS;
};
}

static int convert_deprecated_cli(pmix_cli_result_t *results,
bool silent)
{
char *option, *p1, *p2, *tmp, *tmp2, *output, *modifier;
char *option, *p1, *p2, *tmp, *tmp2, *output;
int rc = PRTE_SUCCESS;
pmix_cli_item_t *opt, *nxt;
prte_value_t *pval, val;
bool warn;

if (silent) {
Expand Down Expand Up @@ -888,10 +887,10 @@ static int parse_env(char **srcenv, char ***dstenv,
int i, j, n;
char *p1, *p2;
char **env;
prte_value_t *pval;
char **xparams = NULL, **xvals = NULL;
char *param, *value;
pmix_cli_item_t *opt;
PRTE_HIDE_UNUSED_PARAMS(srcenv);

pmix_output_verbose(1, prte_schizo_base_framework.framework_output,
"%s schizo:prte: parse_env",
Expand Down Expand Up @@ -1178,11 +1177,13 @@ static void allow_run_as_root(pmix_cli_result_t *cli)
static void job_info(pmix_cli_result_t *results,
void *jobinfo)
{
PRTE_HIDE_UNUSED_PARAMS(results, jobinfo);
return;
}

static int set_default_rto(prte_job_t *jdata,
prte_rmaps_options_t *options)
{
PRTE_HIDE_UNUSED_PARAMS(options);
return prte_state_base_set_runtime_options(jdata, NULL);
}
10 changes: 8 additions & 2 deletions src/mca/state/dvm/state_dvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static prte_state_cbfunc_t proc_callbacks[] = {

static void force_quit(int fd, short args, void *cbdata)
{
PRTE_HIDE_UNUSED_PARAMS(fd, args);
prte_state_caddy_t *caddy = (prte_state_caddy_t *) cbdata;

/* give us a chance to stop the orteds */
Expand Down Expand Up @@ -246,6 +247,7 @@ static void files_ready(int status, void *cbdata)

static void init_complete(int sd, short args, void *cbdata)
{
PRTE_HIDE_UNUSED_PARAMS(sd, args);
prte_state_caddy_t *caddy = (prte_state_caddy_t *) cbdata;

PMIX_ACQUIRE_OBJECT(caddy);
Expand All @@ -267,6 +269,7 @@ static void vm_ready(int fd, short args, void *cbdata)
int32_t v;
pmix_value_t *val;
pmix_status_t ret;
PRTE_HIDE_UNUSED_PARAMS(fd, args, cbdata);

PMIX_ACQUIRE_OBJECT(caddy);
/* if this is my job, then we are done */
Expand Down Expand Up @@ -374,6 +377,7 @@ static void job_started(int fd, short args, void *cbdata)
pmix_info_t *iptr;
time_t timestamp;
pmix_proc_t *nptr;
PRTE_HIDE_UNUSED_PARAMS(fd, args);

/* if there is an originator for this job, notify them
* that the first process of the job has been started */
Expand Down Expand Up @@ -420,6 +424,7 @@ static void ready_for_debug(int fd, short args, void *cbdata)
int n;
char *name;
prte_app_context_t *app;
PRTE_HIDE_UNUSED_PARAMS(fd, args);

/* launch was requested by a TOOL, so we notify the launch proxy
* and NOT the originator (as that would be us) */
Expand Down Expand Up @@ -517,9 +522,8 @@ static void check_complete(int fd, short args, void *cbdata)
hwloc_obj_t obj;
hwloc_obj_type_t type;
hwloc_cpuset_t boundcpus, tgt;
unsigned n;
uint16_t u16, *u16ptr = &u16;
bool takeall;
PRTE_HIDE_UNUSED_PARAMS(fd, args);

PMIX_ACQUIRE_OBJECT(caddy);
jdata = caddy->jdata;
Expand Down Expand Up @@ -857,6 +861,7 @@ static void check_complete(int fd, short args, void *cbdata)
static void cleanup_job(int sd, short args, void *cbdata)
{
prte_state_caddy_t *caddy = (prte_state_caddy_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_ACQUIRE_OBJECT(caddy);

Expand Down Expand Up @@ -886,6 +891,7 @@ static void dvm_notify(int sd, short args, void *cbdata)
pmix_data_range_t range = PMIX_RANGE_SESSION;
pmix_status_t code, ret;
char *errmsg = NULL;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_OUTPUT_VERBOSE((2, prte_state_base_framework.framework_output,
"%s state:dvm:dvm_notify called",
Expand Down
2 changes: 2 additions & 0 deletions src/mca/state/prted/state_prted.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ static void track_jobs(int fd, short argc, void *cbdata)
int rc, i;
prte_proc_state_t running = PRTE_PROC_STATE_RUNNING;
prte_proc_t *child;
PRTE_HIDE_UNUSED_PARAMS(fd, argc);

PMIX_ACQUIRE_OBJECT(caddy);

Expand Down Expand Up @@ -331,6 +332,7 @@ static void track_procs(int fd, short argc, void *cbdata)
pmix_proc_t target;
prte_pmix_lock_t lock;
prte_app_context_t *app;
PRTE_HIDE_UNUSED_PARAMS(fd, argc);

PMIX_ACQUIRE_OBJECT(caddy);
proc = &caddy->name;
Expand Down
1 change: 1 addition & 0 deletions src/pmix/pmix.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ static void cleanup_cbfunc(pmix_status_t status, pmix_info_t *info, size_t ninfo
pmix_release_cbfunc_t release_fn, void *release_cbdata)
{
prte_pmix_lock_t *lk = (prte_pmix_lock_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(info, ninfo);

PMIX_POST_OBJECT(lk);

Expand Down
16 changes: 16 additions & 0 deletions src/prted/pmix/pmix_server_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ static void _client_conn(int sd, short args, void *cbdata)
{
prte_pmix_server_op_caddy_t *cd = (prte_pmix_server_op_caddy_t *) cbdata;
prte_proc_t *p;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_ACQUIRE_OBJECT(cd);

Expand Down Expand Up @@ -94,6 +95,7 @@ static void _client_finalized(int sd, short args, void *cbdata)
{
prte_pmix_server_op_caddy_t *cd = (prte_pmix_server_op_caddy_t *) cbdata;
prte_proc_t *p;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_ACQUIRE_OBJECT(cd);

Expand Down Expand Up @@ -125,6 +127,7 @@ static void _client_abort(int sd, short args, void *cbdata)
{
prte_pmix_server_op_caddy_t *cd = (prte_pmix_server_op_caddy_t *) cbdata;
prte_proc_t *p;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_ACQUIRE_OBJECT(cd);

Expand Down Expand Up @@ -155,6 +158,7 @@ pmix_status_t pmix_server_abort_fn(const pmix_proc_t *proc, void *server_object,
static void _register_events(int sd, short args, void *cbdata)
{
prte_pmix_server_op_caddy_t *cd = (prte_pmix_server_op_caddy_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_ACQUIRE_OBJECT(cd);

Expand Down Expand Up @@ -194,6 +198,7 @@ pmix_status_t pmix_server_register_events_fn(pmix_status_t *codes, size_t ncodes
static void _deregister_events(int sd, short args, void *cbdata)
{
prte_pmix_server_op_caddy_t *cd = (prte_pmix_server_op_caddy_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_ACQUIRE_OBJECT(cd);

Expand Down Expand Up @@ -227,6 +232,7 @@ pmix_status_t pmix_server_deregister_events_fn(pmix_status_t *codes, size_t ncod
static void _notify_release(int status, void *cbdata)
{
prte_pmix_server_op_caddy_t *cd = (prte_pmix_server_op_caddy_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(status);

PMIX_ACQUIRE_OBJECT(cd);

Expand All @@ -248,6 +254,7 @@ void pmix_server_notify(int status, pmix_proc_t *sender, pmix_data_buffer_t *buf
pmix_status_t code, ret;
size_t ninfo;
pmix_rank_t vpid;
PRTE_HIDE_UNUSED_PARAMS(status, tg, cbdata);

pmix_output_verbose(2, prte_pmix_server_globals.output,
"%s PRTE Notification received from %s",
Expand Down Expand Up @@ -343,6 +350,7 @@ pmix_status_t pmix_server_notify_event(pmix_status_t code, const pmix_proc_t *so
pmix_data_buffer_t pbkt;
pmix_status_t ret;
size_t n;
PRTE_HIDE_UNUSED_PARAMS(cbfunc, cbdata);

pmix_output_verbose(2, prte_pmix_server_globals.output,
"%s local process %s generated event code %s range %s",
Expand Down Expand Up @@ -457,6 +465,7 @@ void pmix_server_jobid_return(int status, pmix_proc_t *sender,
int32_t ret, cnt;
pmix_nspace_t jobid;
pmix_proc_t proc;
PRTE_HIDE_UNUSED_PARAMS(status, sender, tg, cbdata);

/* unpack the status - this is already a PMIx value */
cnt = 1;
Expand Down Expand Up @@ -517,6 +526,7 @@ static void _toolconn(int sd, short args, void *cbdata)
pmix_data_buffer_t *buf;
prte_plm_cmd_flag_t command = PRTE_PLM_ALLOC_JOBID_CMD;
pmix_status_t xrc;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_ACQUIRE_OBJECT(cd);

Expand Down Expand Up @@ -652,6 +662,7 @@ void pmix_tool_connected_fn(pmix_info_t *info, size_t ninfo, pmix_tool_connectio
static void lgcbfn(int sd, short args, void *cbdata)
{
prte_pmix_server_op_caddy_t *cd = (prte_pmix_server_op_caddy_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

if (NULL != cd->cbfunc) {
cd->cbfunc(cd->status, cd->cbdata);
Expand Down Expand Up @@ -765,6 +776,7 @@ pmix_status_t pmix_server_job_ctrl_fn(const pmix_proc_t *requestor, const pmix_p
prte_daemon_cmd_flag_t cmmnd;
prte_grpcomm_signature_t *sig;
pmix_proc_t *proct;
PRTE_HIDE_UNUSED_PARAMS(cbfunc, cbdata);

pmix_output_verbose(2, prte_pmix_server_globals.output,
"%s job control request from %s:%d",
Expand Down Expand Up @@ -1054,6 +1066,7 @@ pmix_status_t pmix_server_iof_pull_fn(const pmix_proc_t procs[], size_t nprocs,
prte_iof_sink_t *sink;
size_t i;
bool stop = false;
PRTE_HIDE_UNUSED_PARAMS(cbfunc, cbdata);

/* no really good way to do this - we have to search the directives to
* see if we are being asked to stop the specified channels before
Expand Down Expand Up @@ -1095,6 +1108,7 @@ static void pmix_server_stdin_push(int sd, short args, void *cbdata)
prte_pmix_server_op_caddy_t *cd = (prte_pmix_server_op_caddy_t *) cbdata;
pmix_byte_object_t *bo = (pmix_byte_object_t *) cd->server_object;
size_t n;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

for (n = 0; n < cd->nprocs; n++) {
PMIX_OUTPUT_VERBOSE((1, prte_pmix_server_globals.output,
Expand All @@ -1119,6 +1133,8 @@ pmix_status_t pmix_server_stdin_fn(const pmix_proc_t *source, const pmix_proc_t
const pmix_byte_object_t *bo, pmix_op_cbfunc_t cbfunc,
void *cbdata)
{
PRTE_HIDE_UNUSED_PARAMS(source, directives, ndirs);

// Note: We are ignoring the directives / ndirs at the moment
PRTE_IO_OP(targets, ntargets, bo, pmix_server_stdin_push, cbfunc, cbdata);

Expand Down
1 change: 1 addition & 0 deletions src/prted/pmix/pmix_server_queries.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ static void _query(int sd, short args, void *cbdata)
prte_proc_t *proct;
pmix_proc_t *proc;
size_t sz;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

PMIX_ACQUIRE_OBJECT(cd);

Expand Down
2 changes: 0 additions & 2 deletions src/rml/rml_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ int prte_rml_send_buffer_nb(pmix_rank_t rank,
{
prte_rml_recv_t *rcv;
prte_rml_send_t *snd;
pmix_status_t rc;
pmix_proc_t peer;

PMIX_OUTPUT_VERBOSE((1, prte_rml_base.rml_output,
"%s rml_send_buffer to peer %s at tag %d",
Expand Down
1 change: 0 additions & 1 deletion src/rml/routed_radix.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ void prte_rml_compute_routing_tree(void)
{
prte_routed_tree_t *child;
int j;
pmix_list_item_t *item;
int Level, Sum, NInLevel, Ii;
int NInPrevLevel;
prte_job_t *dmns;
Expand Down
1 change: 0 additions & 1 deletion src/runtime/prte_globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ static void prte_job_destruct(prte_job_t *job)
prte_timer_t *evtimer;
prte_job_t *child_jdata = NULL;
pmix_list_t *cache = NULL;
prte_info_item_t *kv = NULL;

if (NULL == job) {
/* probably just a race condition - just return */
Expand Down

0 comments on commit 9c48d62

Please sign in to comment.