Commit ee7f0aae authored by Antonio J. Pena's avatar Antonio J. Pena
Browse files

Fix compiler warnings in pmip_cb.c



Fixes the following warnings when compiling pmip_cb.c with --enable-strict:

pm/pmiserv/pmip_cb.c:803:9: warning: null argument where non-null required
(argument 1) [-Wnonnull]
pm/pmiserv/pmip_cb.c:803:9: warning: null argument where non-null required
(argument 2) [-Wnonnull]

Related to ticket #1966
Signed-off-by: default avatarWesley Bland <wbland@mcs.anl.gov>
parent c2dc7a35
......@@ -520,8 +520,6 @@ AC_DEFINE_UNQUOTED(HYDRA_AVAILABLE_CKPOINTLIBS,"$available_ckpointlibs",
if test "$hydra_default_ckpointlib" != "" ; then
AC_DEFINE_UNQUOTED(HYDRA_DEFAULT_CKPOINTLIB,"$hydra_default_ckpointlib",
[Default checkpointing library])
else
AC_DEFINE(HYDRA_DEFAULT_CKPOINTLIB,NULL,[Default checkpointing library])
fi
AM_CONDITIONAL([hydra_have_blcr], [test "${have_blcr}" = "yes"])
......
......@@ -799,8 +799,10 @@ static HYD_status parse_exec_params(char **t_argv)
if (HYD_pmcd_pmip.user_global.topolib == NULL && HYDRA_DEFAULT_TOPOLIB)
HYD_pmcd_pmip.user_global.topolib = HYDU_strdup(HYDRA_DEFAULT_TOPOLIB);
if (HYD_pmcd_pmip.user_global.ckpointlib == NULL && HYDRA_DEFAULT_CKPOINTLIB)
#ifdef HYDRA_DEFAULT_CKPOINTLIB
if (HYD_pmcd_pmip.user_global.ckpointlib == NULL)
HYD_pmcd_pmip.user_global.ckpointlib = HYDU_strdup(HYDRA_DEFAULT_CKPOINTLIB);
#endif
fn_exit:
HYDU_FUNC_EXIT();
......
......@@ -30,11 +30,16 @@ HYD_status HYDT_ckpoint_init(const char *user_ckpointlib, int user_ckpoint_num)
if (user_ckpointlib)
HYDT_ckpoint_info.ckpointlib = user_ckpointlib;
else if (MPL_env2str("HYDRA_CKPOINTLIB", (const char **) &HYDT_ckpoint_info.ckpointlib) == 0)
#ifdef HYDRA_DEFAULT_CKPOINTLIB
HYDT_ckpoint_info.ckpointlib = HYDRA_DEFAULT_CKPOINTLIB;
/* If there is no default checkpointlib, we bail out */
if (HYDRA_DEFAULT_CKPOINTLIB == NULL)
#else
{
/* If there is no default checkpointlib, we bail out */
HYDT_ckpoint_info.ckpointlib = NULL;
goto fn_exit;
}
#endif
HYDT_ckpoint_info.ckpoint_num = (user_ckpoint_num == -1) ? 0 : user_ckpoint_num;
in_ckpt = HYDT_CKPOINT_NONE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment