[Openais] [PATCH 3/3] Fix some "set but not used" warnings [-Wunused-but-set-variable]

Angus Salkeld asalkeld at redhat.com
Mon Mar 14 19:26:44 PDT 2011


On Mon, Mar 14, 2011 at 08:57:06PM -0500, Russell Bryant wrote:
> On Mon, Mar 14, 2011 at 6:44 PM, Angus Salkeld <asalkeld at redhat.com> wrote:
> > -       res = totempg_groups_mcast_joined (sync_group_handle,
> > +       (void)totempg_groups_mcast_joined (sync_group_handle,
> >                &iovec, 1, TOTEMPG_AGREED);
> >  }
> >
> 
> Were all of these casts actually needed?  I thought maybe that this
> function had the warn_unused_result attribute set but it doesn't
> appear to.

No, but other tools check return values (splint, coverity,...).

-Angus

> 
> --
> Russell Bryant
> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais


More information about the Openais mailing list