Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] PATCH: Wrong event_type value passed in to show_help when getting xrc async events
From: nadia.derbey (Nadia.Derbey_at_[hidden])
Date: 2010-07-15 08:22:56


On Thu, 2010-07-15 at 07:21 -0400, Jeff Squyres wrote:
> On Jul 15, 2010, at 2:14 AM, nadia.derbey wrote:
>
> > The only warning I'm getting in the part of the code impacted by the
> > patch is:
> > ---------------------
> > ../../../../../ompi/mca/btl/openib/btl_openib_async.c(322): warning
> > #188: enumerated type mixed with another type
> > event_type ^= IBV_XRC_QP_EVENT_FLAG;
> > ---------------------
>
> Ya, that's the one.
>
> Is there any way to get rid of that @!#@#$ warning? I'm not sure what it's complaining about -- event_type and IBV_XRC_QP_EVENT_FLAG are the same type, no?
>

well, the problem is that event->event_type is declared as an enumerated
type (ibv_event_type).
In case of XRC it is OR'd with another enumerated type
(ibv_event_flags).

So the solution is:
 1. leave the intermediate event_type declared as an int.
 2. then:
      . either cast it to ibv_event_type when calling
openib_event_to_str()
      . or declare openib_event_to_str as accepting an int instead of an
ibv_event_type.

Both solutions attached

Regards,
Nadia

> Specifically: I think your patch is good. But it would be good to not introduce yet another / fix all these intel compiler warnings about mixing ints and enums.
>

-- 
nadia.derbey <Nadia.Derbey_at_[hidden]>