Hi Yevgeny,

On 09:41 Wed 25 Jun     , Yevgeny Kliteynik wrote:
> 
> Fixing some data types and corresponding log messages,
> thus solving compiler warnings.
> 
> Signed-off-by: Yevgeny Kliteynik <[EMAIL PROTECTED]>
> ---
>  opensm/opensm/osm_state_mgr.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
> index f15a4af..6ca276b 100644
> --- a/opensm/opensm/osm_state_mgr.c
> +++ b/opensm/opensm/osm_state_mgr.c
> @@ -863,7 +863,8 @@ static void __osm_state_mgr_check_tbl_consistency(IN 
> osm_sm_t * sm)
>       osm_port_t *p_port;
>       osm_port_t *p_next_port;
>       cl_ptr_vector_t *p_port_lid_tbl;
> -     size_t max_lid, ref_size, curr_size, lid;
> +     size_t ref_size, curr_size;
> +     uint16_t max_lid, lid;

Finally it stores ref_size or cur_size values in max_lid, so it can
overflow. Could you be more specific about compiler warnings?

>       osm_port_t *p_port_ref, *p_port_stored;
>       cl_ptr_vector_t ref_port_lid_tbl;
>       uint16_t min_lid_ho;
> @@ -921,7 +922,7 @@ static void __osm_state_mgr_check_tbl_consistency(IN 
> osm_sm_t * sm)
>                        * with the new lid we wanted to give it in our
>                        * port_lid_tbl. */
>                       OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3322: "
> -                             "lid %u is wrongly assigned to port 0x%016"
> +                             "lid 0x%04x is wrongly assigned to port 0x%016"

It was discussed on the list (and even marked as a bug in bugzilla) that
unicast LIDs should be represented in decimal form in logs.

Sasha
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to