From ffe705148875e7c07fbd3d9a0df42ded9c908e46 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Tue, 5 Sep 2006 09:16:22 +0000 Subject: [PATCH] fix compilation warnings. This commit was SVN r11524. --- ompi/mca/btl/openib/btl_openib.h | 2 +- ompi/mca/btl/openib/btl_openib_endpoint.c | 2 +- ompi/mca/btl/openib/btl_openib_endpoint.h | 2 +- ompi/mca/btl/openib/btl_openib_frag.h | 2 +- ompi/mca/btl/openib/btl_openib_ini.c | 7 ++++--- ompi/mca/btl/openib/btl_openib_mca.c | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ompi/mca/btl/openib/btl_openib.h b/ompi/mca/btl/openib/btl_openib.h index d7d0d2f969..281faa9b79 100644 --- a/ompi/mca/btl/openib/btl_openib.h +++ b/ompi/mca/btl/openib/btl_openib.h @@ -116,7 +116,7 @@ struct mca_btl_openib_component_t { uint32_t ib_service_level; uint32_t ib_static_rate; uint32_t use_eager_rdma; - uint32_t eager_rdma_threshold; + int32_t eager_rdma_threshold; uint32_t eager_rdma_num; uint32_t max_eager_rdma; uint32_t btls_per_lid; diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.c b/ompi/mca/btl/openib/btl_openib_endpoint.c index 880d571959..23b90e81a9 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.c +++ b/ompi/mca/btl/openib/btl_openib_endpoint.c @@ -577,7 +577,7 @@ static void mca_btl_openib_endpoint_recv( void* cbdata) { mca_btl_openib_proc_t *ib_proc; - mca_btl_openib_endpoint_t *ib_endpoint; + mca_btl_openib_endpoint_t *ib_endpoint = NULL; int endpoint_state; int rc; uint32_t i; diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.h b/ompi/mca/btl/openib/btl_openib_endpoint.h index de8617c678..0ceb26f740 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.h +++ b/ompi/mca/btl/openib/btl_openib_endpoint.h @@ -164,7 +164,7 @@ struct mca_btl_base_endpoint_t { uint16_t subnet; /**< subnet of this endpoint*/ - uint32_t eager_recv_count; /**< number of eager received */ + int32_t eager_recv_count; /**< number of eager received */ mca_btl_openib_eager_rdma_remote_t eager_rdma_remote; /**< info about remote RDMA buffer */ mca_btl_openib_eager_rdma_local_t eager_rdma_local; diff --git a/ompi/mca/btl/openib/btl_openib_frag.h b/ompi/mca/btl/openib/btl_openib_frag.h index f92ba167ab..db6a2d2c2d 100644 --- a/ompi/mca/btl/openib/btl_openib_frag.h +++ b/ompi/mca/btl/openib/btl_openib_frag.h @@ -159,7 +159,7 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_send_frag_control_t); #define MCA_BTL_IB_FRAG_RETURN(btl, frag) \ { do { \ - ompi_free_list_t* my_list; \ + ompi_free_list_t* my_list = NULL; \ switch(frag->type) { \ case MCA_BTL_OPENIB_FRAG_EAGER_RDMA: \ case MCA_BTL_OPENIB_FRAG_EAGER: \ diff --git a/ompi/mca/btl/openib/btl_openib_ini.c b/ompi/mca/btl/openib/btl_openib_ini.c index 1ff57af3ef..20643faf99 100644 --- a/ompi/mca/btl/openib/btl_openib_ini.c +++ b/ompi/mca/btl/openib/btl_openib_ini.c @@ -101,7 +101,7 @@ static inline void show_help(const char *topic); */ int ompi_btl_openib_ini_init(void) { - int ret; + int ret = OMPI_ERR_NOT_FOUND; char *colon; OBJ_CONSTRUCT(&hcas, opal_list_t); @@ -308,7 +308,7 @@ cleanup: static int parse_line(parsed_section_values_t *sv) { int val, ret = OMPI_SUCCESS; - char *value; + char *value = NULL; bool showed_unknown_field_warning = false; /* Save the name name */ @@ -391,7 +391,8 @@ static int parse_line(parsed_section_values_t *sv) /* All done */ - free(value); + if(NULL != value) + free(value); return ret; } diff --git a/ompi/mca/btl/openib/btl_openib_mca.c b/ompi/mca/btl/openib/btl_openib_mca.c index 0cf19b20e0..a37730ced0 100644 --- a/ompi/mca/btl/openib/btl_openib_mca.c +++ b/ompi/mca/btl/openib/btl_openib_mca.c @@ -304,7 +304,7 @@ int btl_openib_register_mca_params(void) "messages are received from a given peer " "(must be >= 1)", 16, &ival, REGINT_GE_ONE)); - mca_btl_openib_component.eager_rdma_threshold = (uint32_t) ival; + mca_btl_openib_component.eager_rdma_threshold = (int32_t) ival; CHECK(reg_int("max_eager_rdma", "Maximum number of peers allowed to use " "RDMA for short messages (RDMA is used for all long "