Oracle Studio 12.5 C compiler on a recent v2.0 nightly tarball points out
the following unreachable code:

"/shared/OMPI/openmpi-2.0-latest-solaris11-x86-ib-ss12u5/openmpi-v2.0.0-227-g917d293/opal/mca/base/mca_base_component_repository.c",
line 265: warning: statement not reached
"/shared/OMPI/openmpi-2.0-latest-solaris11-x86-ib-ss12u5/openmpi-v2.0.0-227-g917d293/opal/mca/btl/openib/btl_openib.c",
line 498: warning: statement not reached
"/shared/OMPI/openmpi-2.0-latest-solaris11-x86-ib-ss12u5/openmpi-v2.0.0-227-g917d293/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c",
line 2735: warning: statement not reached
"/shared/OMPI/openmpi-2.0-latest-solaris11-x86-ib-ss12u5/openmpi-v2.0.0-227-g917d293/ompi/mca/io/romio314/romio/adio/common/ad_fstype.c",
line 306: warning: statement not reached
"/shared/OMPI/openmpi-2.0-latest-solaris11-x86-ib-ss12u5/openmpi-v2.0.0-227-g917d293/ompi/mca/io/romio314/romio/adio/common/ad_threaded_io.c",
line 31: warning: statement not reached

I will ignore the ROMIO ones, leaving 3 to diagnose.

1) opal/mca/base/mca_base_component_repository.c, line 265:
   260      *framework_components = NULL;
   261  #if OPAL_HAVE_DL_SUPPORT
   262      return opal_hash_table_get_value_ptr
(&mca_base_component_repository, framework->framework_name,
   263                                            strlen
(framework->framework_name), (void **) framework_components);
   264  #endif
 > 265      return OPAL_ERR_NOT_FOUND;
   266  }
   267
   268  #if OPAL_HAVE_DL_SUPPORT
   269  static void mca_base_component_repository_release_internal
(mca_base_component_repository_item_t *ri) {
   270      int group_id;

The unreachable warning easily fixed with an '#else' clause as follows:

--- opal/mca/base/mca_base_component_repository.c~      Sat Aug 27 02:03:23
2016
+++ opal/mca/base/mca_base_component_repository.c       Sat Aug 27 02:03:41
2016
@@ -261,8 +261,9 @@
 #if OPAL_HAVE_DL_SUPPORT
     return opal_hash_table_get_value_ptr (&mca_base_component_repository,
framework->framework_name,
                                           strlen
(framework->framework_name), (void **) framework_components);
-#endif
+#else
     return OPAL_ERR_NOT_FOUND;
+#endif
 }

 #if OPAL_HAVE_DL_SUPPORT



2) opal/mca/btl/openib/btl_openib.c line 498 is also due to a return right
after an #endif, and can also be fixed with an #else.

   493                  case IBV_LINK_LAYER_UNSPECIFIED:
   494                  default:
   495                      return MCA_BTL_OPENIB_TRANSPORT_UNKNOWN;
   496              }
   497  #endif
 > 498              return MCA_BTL_OPENIB_TRANSPORT_IB;
   499
   500          case IBV_TRANSPORT_IWARP:
   501              return MCA_BTL_OPENIB_TRANSPORT_IWARP;
   502
   503          case IBV_TRANSPORT_UNKNOWN:

3) opal/mca/btl/openib/connect/btl_openib_connect_udcm.c line 2735 looks
like debugging code (the "while(1)" on line 2734) that maybe was not
intended to be committed:

  2730                                  IBV_QP_PORT | IBV_QP_ACCESS_FLAGS);
  2731      if (ret) {
  2732          BTL_ERROR(("Error modifying XRC recv QP[%x] to
IBV_QPS_INIT, errno says: %s [%d]",
  2733                     lcl_ep->xrc_recv_qp_num, strerror(ret), ret));
  2734          while(1);
> 2735          return OPAL_ERROR;
  2736      }
  2737  #endif
  2738
  2739      memset(&attr, 0, sizeof(struct ibv_qp_attr));
  2740      attr.qp_state           = IBV_QPS_RTR;


-Paul


-- 
Paul H. Hargrove                          phhargr...@lbl.gov
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department               Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Reply via email to