On Tue, Mar 29, 2011 at 12:24 PM, Bart Van Assche <bvanass...@acm.org> wrote:
>
> On Mon, Mar 28, 2011 at 11:14 PM, Julian Seward <jsew...@acm.org> wrote:
> > On Monday, March 28, 2011, Bart Van Assche wrote:
> >> On Mon, Mar 28, 2011 at 6:32 PM, Julian Seward <jsew...@acm.org> wrote:
> >> > On Monday, March 28, 2011, Piotr Jaroszyński wrote:
> >> > > I think the proper solution is to add __attribute__((unused)) to
> >> > > _qzz_res. What do you think?
> >> >
> >> > Yes.  I just committed exactly such cleanups (r11673).  Could
> >> > you try it, to see if that also makes your compiles quiet again?
> >>
> >> Strange - I still see such warnings with r11673 while building the
> >> regression tests:
> >
> > Should be considerably improved, although not perfect, when building
> > the regtests now.  (at r 11675).
>
> The approach followed so far -- adding __attribute__((unused)) to
> unused variables used to store client request results -- has an
> important benefit, that is that the API for invoking client requests
> is preserved. Has the following already been considered:
> - Define a new facility for invoking client requests, e.g.
> VALGRIND_DO_CLIENT_REQUEST_E(), in such a way that it yields the
> result value of the client request instead of assigning that result
> value to a variable. It's not yet clear to me whether such a facility
> should be defined as a macro that uses a statement expression or as an
> inline function.
> - Redefine the existing macro VALGRIND_DO_CLIENT_REQUEST() such that
> it uses the new facility.
> - Replace invocations of VALGRIND_DO_CLIENT_REQUEST() in tools by
> VALGRIND_DO_CLIENT_REQUEST_E(). This transformation will allow to
> eliminate unused "res" variables instead of having to annotate them
> with __attribute__((unused)).

A patch that implements the above is available here:
https://bugs.kde.org/show_bug.cgi?id=269778.

Suggestions for how to get rid of the new "value computed is not used"
warnings are welcome.

Bart.

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to