[Mesa-dev] [PATCH] mesa: Add a MUST_CHECK macro for __attribute__((warn_unused_result)).
Kenneth Graunke
kenneth at whitecape.org
Mon Jul 6 13:43:07 PDT 2015
On Monday, July 06, 2015 09:27:12 PM Chris Wilson wrote:
> On Mon, Jul 06, 2015 at 11:18:00AM -0700, Kenneth Graunke wrote:
> > In the kernel, this is called __must_check; all our attribute macros in
> > Mesa appear to be uppercase, so I went with that.
> >
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > Cc: chris at chris-wilson.co.uk
> > Cc: mattst88 at gmail.com
> > ---
> > configure.ac | 1 +
> > src/util/macros.h | 6 ++++++
> > 2 files changed, 7 insertions(+)
> >
> > I noticed Chris wants to use this in one of his patches, so I figured I'd
> > throw together a patch to do this a bit more cleanly.
>
> That would suit me very much. I guess I need to learn about
> AX_GCC_FUNC_ATTRIBUTE!
>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> -Chris
It's pretty handy! Matt found it in the autoconf archive:
http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
We just dropped it in our m4/ directory.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150706/57f3add5/attachment.sig>
More information about the mesa-dev
mailing list