Commit 2be371d5 authored by Kenneth Raffenetti's avatar Kenneth Raffenetti
Browse files

move error checking inside guards in info_get.c

Commit [7dfe2840

] broke builds with error checking disabled. We fix this
by moving the guards to ensure the fn_exit and fn_fail labels are always
present and only the error checking code is preprocessed out.

Fixes #2225
Signed-off-by: Rajeev Thakur's avatarRajeev Thakur <thakur@mcs.anl.gov>
parent 2e4af0c1
......@@ -150,16 +150,14 @@ int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value,
/* ... end of body of routine ... */
if (mpi_errno) goto fn_fail;
#ifdef HAVE_ERROR_CHECKING
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_GET);
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
# ifdef HAVE_ERROR_CHECKING
fn_fail:
# ifdef HAVE_ERROR_CHECKING
{
mpi_errno = MPIR_Err_create_code( mpi_errno, MPIR_ERR_RECOVERABLE,
FCNAME, __LINE__, MPI_ERR_OTHER,
......@@ -167,7 +165,7 @@ int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value,
"**mpi_info_get %I %s %d %p %p", info, key, valuelen, value, flag);
}
mpi_errno = MPIR_Err_return_comm( NULL, FCNAME, mpi_errno );
goto fn_exit;
# endif
goto fn_exit;
/* --END ERROR HANDLING-- */
}
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