[ofa-general] Re: [PATCH v2] [TRIVIAL] opensm/osm_state_mgr.c: fixing some data types
Sasha Khapyorsky
sashak at voltaire.com
Mon Jun 30 00:29:54 PDT 2008
On 09:49 Mon 30 Jun , Yevgeny Kliteynik wrote:
> Fixing some data types and solving compiler warnings
> in the corresponding log messages.
>
> Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
> ---
> opensm/opensm/osm_state_mgr.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
> index 9a8409b..734df79 100644
> --- a/opensm/opensm/osm_state_mgr.c
> +++ b/opensm/opensm/osm_state_mgr.c
> @@ -862,7 +862,7 @@ 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;
> + uint16_t max_lid, ref_size, curr_size, lid;
Those values are used for storing result of cl_ptr_vector_get_size()
which has size_t type. I think the proper solution for this is to use
'%zu' format in OSM_LOG().
Sasha
More information about the general
mailing list