emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attribute warn_unused_result


From: Stefan Monnier
Subject: Re: attribute warn_unused_result
Date: Thu, 03 Feb 2011 13:53:25 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Do we care about these warnings?  There's significant controversy
> about them (e.g., the warnings about `write' are when we write an
> error message to stderr, in which case there's nothing useful one can
> do with the return value), so I'm not sure we should care.

I think the right thing to do is to adjust the code so as to make it
clear to the compiler that we thought about the issue and decided that
we really do want to ignore the return value.

So, for each such case, we should think about it and if we indeed want
to ignore the return value, we should put an explicit cast to that
effect (which should hopefully be understood by gcc to silence the
warning).


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]