Fix some Coverity 'Event set_but_not_used' highlights.
Thanks to Jeff for bringing them to my attention. This commit was SVN r18606.
Этот коммит содержится в:
родитель
e8c8d0c03b
Коммит
1de50b523c
@ -146,10 +146,10 @@ int ompi_crcp_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("crcp", ompi_crcp_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("crcp", ompi_crcp_base_output,
|
||||
&ompi_crcp_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = OMPI_ERROR;
|
||||
goto cleanup;
|
||||
@ -162,8 +162,8 @@ int ompi_crcp_base_select(void)
|
||||
|
||||
/* Initialize the winner */
|
||||
if (NULL != best_module) {
|
||||
if (OPAL_SUCCESS != ompi_crcp.crcp_init()) {
|
||||
exit_status = OMPI_ERROR;
|
||||
if (OPAL_SUCCESS != (ret = ompi_crcp.crcp_init()) ) {
|
||||
exit_status = ret;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -36,10 +36,10 @@ int ompi_dpm_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("dpm", ompi_dpm_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("dpm", ompi_dpm_base_output,
|
||||
&ompi_dpm_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = OMPI_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
|
@ -36,10 +36,10 @@ int ompi_pubsub_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("pubsub", ompi_pubsub_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("pubsub", ompi_pubsub_base_output,
|
||||
&ompi_pubsub_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = OMPI_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
|
@ -45,10 +45,10 @@ int opal_carto_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("carto", opal_carto_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("carto", opal_carto_base_output,
|
||||
&opal_carto_base_components_opened,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = OPAL_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
@ -61,8 +61,8 @@ int opal_carto_base_select(void)
|
||||
|
||||
/* Initialize the winner */
|
||||
if (NULL != opal_carto_base_module) {
|
||||
if (OPAL_SUCCESS != opal_carto_base_module->carto_module_init()) {
|
||||
exit_status = OPAL_ERROR;
|
||||
if (OPAL_SUCCESS != (ret = opal_carto_base_module->carto_module_init()) ) {
|
||||
exit_status = ret;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -147,10 +147,10 @@ int opal_crs_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("crs", opal_crs_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("crs", opal_crs_base_output,
|
||||
&opal_crs_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = OPAL_ERROR;
|
||||
goto cleanup;
|
||||
@ -163,8 +163,8 @@ int opal_crs_base_select(void)
|
||||
|
||||
/* Initialize the winner */
|
||||
if (NULL != best_module) {
|
||||
if (OPAL_SUCCESS != opal_crs.crs_init()) {
|
||||
exit_status = OPAL_ERROR;
|
||||
if (OPAL_SUCCESS != (ret = opal_crs.crs_init()) ) {
|
||||
exit_status = ret;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -44,10 +44,10 @@ int opal_maffinity_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("maffinity", opal_maffinity_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("maffinity", opal_maffinity_base_output,
|
||||
&opal_maffinity_base_components_opened,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = OPAL_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
@ -60,8 +60,8 @@ int opal_maffinity_base_select(void)
|
||||
|
||||
/* Initialize the winner */
|
||||
if (NULL != opal_maffinity_base_module) {
|
||||
if (OPAL_SUCCESS != opal_maffinity_base_module->maff_module_init()) {
|
||||
exit_status = OPAL_ERROR;
|
||||
if (OPAL_SUCCESS != (ret = opal_maffinity_base_module->maff_module_init()) ) {
|
||||
exit_status = ret;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -39,10 +39,10 @@ int opal_memchecker_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("memchecker", opal_memchecker_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("memchecker", opal_memchecker_base_output,
|
||||
&opal_memchecker_base_components_opened,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = OPAL_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
@ -55,8 +55,8 @@ int opal_memchecker_base_select(void)
|
||||
|
||||
/* Initialize the winner */
|
||||
if (NULL != opal_memchecker_base_module) {
|
||||
if (OPAL_SUCCESS != opal_memchecker_base_module->init()) {
|
||||
exit_status = OPAL_ERROR;
|
||||
if (OPAL_SUCCESS != (ret = opal_memchecker_base_module->init()) ) {
|
||||
exit_status = ret;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -45,10 +45,10 @@ int opal_paffinity_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("paffinity", opal_paffinity_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("paffinity", opal_paffinity_base_output,
|
||||
&opal_paffinity_base_components_opened,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = OPAL_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
@ -61,8 +61,8 @@ int opal_paffinity_base_select(void)
|
||||
|
||||
/* Initialize the winner */
|
||||
if (NULL != opal_paffinity_base_module) {
|
||||
if (OPAL_SUCCESS != opal_paffinity_base_module->paff_module_init()) {
|
||||
exit_status = OPAL_ERROR;
|
||||
if (OPAL_SUCCESS != (ret = opal_paffinity_base_module->paff_module_init()) ) {
|
||||
exit_status = ret;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
@ -32,20 +32,18 @@
|
||||
*/
|
||||
int orte_errmgr_base_select(void)
|
||||
{
|
||||
int ret, exit_status = OPAL_SUCCESS;
|
||||
mca_errmgr_base_component_t *best_component = NULL;
|
||||
orte_errmgr_base_module_t *best_module = NULL;
|
||||
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("errmgr", orte_errmgr_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("errmgr", orte_errmgr_base_output,
|
||||
&orte_errmgr_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = ORTE_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
return ORTE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* Save the winner */
|
||||
@ -53,6 +51,5 @@ int orte_errmgr_base_select(void)
|
||||
orte_errmgr_base_selected_component = *best_component;
|
||||
orte_errmgr_base_selected = true;
|
||||
|
||||
cleanup:
|
||||
return exit_status;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -32,26 +32,23 @@ extern opal_list_t orte_ess_base_components_available;
|
||||
int
|
||||
orte_ess_base_select(void)
|
||||
{
|
||||
int ret, exit_status = OPAL_SUCCESS;
|
||||
orte_ess_base_component_t *best_component = NULL;
|
||||
orte_ess_base_module_t *best_module = NULL;
|
||||
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("ess", orte_ess_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("ess", orte_ess_base_output,
|
||||
&orte_ess_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = ORTE_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
return ORTE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* Save the winner */
|
||||
/* No global component structure */
|
||||
orte_ess = *best_module;
|
||||
|
||||
cleanup:
|
||||
return exit_status;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ static orte_filem_base_module_t none_module = {
|
||||
|
||||
int orte_filem_base_select(void)
|
||||
{
|
||||
int ret, exit_status = OPAL_SUCCESS;
|
||||
int exit_status = OPAL_SUCCESS;
|
||||
orte_filem_base_component_t *best_component = NULL;
|
||||
orte_filem_base_module_t *best_module = NULL;
|
||||
char *include_list = NULL;
|
||||
@ -107,10 +107,10 @@ int orte_filem_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("filem", orte_filem_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("filem", orte_filem_base_output,
|
||||
&orte_filem_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = ORTE_ERROR;
|
||||
goto cleanup;
|
||||
|
@ -38,10 +38,10 @@ int orte_grpcomm_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("grpcomm", orte_grpcomm_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("grpcomm", orte_grpcomm_base_output,
|
||||
&mca_grpcomm_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = ORTE_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
|
@ -33,7 +33,6 @@
|
||||
*/
|
||||
int orte_odls_base_select(void)
|
||||
{
|
||||
int ret, exit_status = OPAL_SUCCESS;
|
||||
orte_odls_base_component_t *best_component = NULL;
|
||||
orte_odls_base_module_t *best_module = NULL;
|
||||
|
||||
@ -46,13 +45,12 @@ int orte_odls_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("odls", orte_odls_globals.output,
|
||||
if( OPAL_SUCCESS != mca_base_select("odls", orte_odls_globals.output,
|
||||
&orte_odls_base.available_components,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = ORTE_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
return ORTE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* Save the winner */
|
||||
@ -60,6 +58,5 @@ int orte_odls_base_select(void)
|
||||
orte_odls_base.selected_component = *best_component;
|
||||
orte_odls_base.selected = true;
|
||||
|
||||
cleanup:
|
||||
return exit_status;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -39,17 +39,17 @@
|
||||
|
||||
int orte_plm_base_select(void)
|
||||
{
|
||||
int ret, exit_status = OPAL_SUCCESS;
|
||||
int exit_status = ORTE_SUCCESS;
|
||||
orte_plm_base_component_t *best_component = NULL;
|
||||
orte_plm_base_module_t *best_module = NULL;
|
||||
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("plm", orte_plm_globals.output,
|
||||
if( OPAL_SUCCESS != mca_base_select("plm", orte_plm_globals.output,
|
||||
&orte_plm_base.available_components,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected
|
||||
*
|
||||
* If we didn't find one, and we are a daemon, then default to retaining the proxy.
|
||||
|
@ -48,28 +48,25 @@ int orte_ras_base_select(void)
|
||||
#else
|
||||
/* For all other systems, provide the following support */
|
||||
|
||||
int ret, exit_status = OPAL_SUCCESS;
|
||||
orte_ras_base_component_t *best_component = NULL;
|
||||
orte_ras_base_module_t *best_module = NULL;
|
||||
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("ras", orte_ras_base.ras_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("ras", orte_ras_base.ras_output,
|
||||
&orte_ras_base.ras_opened,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
/* If we didn't find one to select, that is okay */
|
||||
exit_status = ORTE_SUCCESS;
|
||||
goto cleanup;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* Save the winner */
|
||||
/* No component saved */
|
||||
orte_ras_base.active_module = best_module;
|
||||
|
||||
cleanup:
|
||||
return exit_status;
|
||||
return ORTE_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
@ -38,26 +38,23 @@
|
||||
*/
|
||||
int orte_rmaps_base_select(void)
|
||||
{
|
||||
int ret, exit_status = OPAL_SUCCESS;
|
||||
orte_rmaps_base_component_t *best_component = NULL;
|
||||
orte_rmaps_base_module_t *best_module = NULL;
|
||||
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("rmaps", orte_rmaps_base.rmaps_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("rmaps", orte_rmaps_base.rmaps_output,
|
||||
&orte_rmaps_base.available_components,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = ORTE_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
return ORTE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* Save the winner */
|
||||
/* No global component structure */
|
||||
orte_rmaps_base.active_module = best_module;
|
||||
|
||||
cleanup:
|
||||
return exit_status;
|
||||
return ORTE_SUCCESS;;
|
||||
}
|
||||
|
@ -70,10 +70,10 @@ orte_routed_base_select(void)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("routed", orte_routed_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("routed", orte_routed_base_output,
|
||||
&orte_routed_base_components,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = ORTE_ERR_NOT_FOUND;
|
||||
goto cleanup;
|
||||
@ -87,8 +87,8 @@ orte_routed_base_select(void)
|
||||
orte_output_verbose(10, orte_routed_base_output,
|
||||
"orte_routed_base_select: initializing selected component %s",
|
||||
best_component->base_version.mca_component_name);
|
||||
if (ORTE_SUCCESS != orte_routed.initialize()) {
|
||||
exit_status = ORTE_ERROR;
|
||||
if (ORTE_SUCCESS != (ret = orte_routed.initialize()) ) {
|
||||
exit_status = ret;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ static orte_snapc_base_module_t none_module = {
|
||||
|
||||
int orte_snapc_base_select(bool seed, bool app)
|
||||
{
|
||||
int ret, exit_status = OPAL_SUCCESS;
|
||||
int exit_status = OPAL_SUCCESS;
|
||||
orte_snapc_base_component_t *best_component = NULL;
|
||||
orte_snapc_base_module_t *best_module = NULL;
|
||||
char *include_list = NULL;
|
||||
@ -100,10 +100,10 @@ int orte_snapc_base_select(bool seed, bool app)
|
||||
/*
|
||||
* Select the best component
|
||||
*/
|
||||
if( OPAL_SUCCESS != (ret = mca_base_select("snapc", orte_snapc_base_output,
|
||||
if( OPAL_SUCCESS != mca_base_select("snapc", orte_snapc_base_output,
|
||||
&orte_snapc_base_components_available,
|
||||
(mca_base_module_t **) &best_module,
|
||||
(mca_base_component_t **) &best_component) ) ) {
|
||||
(mca_base_component_t **) &best_component) ) {
|
||||
/* This will only happen if no component was selected */
|
||||
exit_status = ORTE_ERROR;
|
||||
goto cleanup;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user