[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ignore-value() tweaks
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] ignore-value() tweaks |
Date: |
Wed, 26 Aug 2009 14:01:57 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Jim Meyering wrote:
> Hmm... I guess you could be thinking about
> warnings from non-gcc compilers. Yes, that's another way in which
> (void)i is better.
Right.
BTW, I'm annoyed that one can't always do: (void) function();
but I presume gcc must have a _very_ good reason for that.
> How about this adjusted patch?
> + ignore-value: handle pointer types, too
> + * lib/ignore-value.h (__attribute__): Remove definition.
> + (ignore_value): Remove use of "__attribute__ ((unused))" in favor
> + of a more concise and more-often effective "(void) i" statement.
> + (ignore_ptr): New function to suppress warnings from functions that
> + return pointers, and to make it explicit that one function doesn't
> + handle all cases.
> diff --git a/lib/ignore-value.h b/lib/ignore-value.h
> - Copyright (C) 2008 Free Software Foundation, Inc.
> + Copyright (C) 2008-2009 Free Software Foundation, Inc.
Looks good, thanks for cleaning it up.
Pádraig.