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.


Reply via email to