Re: [patch] add G_GNUC_WARNUNCHECKED define

On Tue, 2004-07-06 at 08:43 +0200, Owen Taylor wrote:

> Another concern is that it isn't clear to me if we start adding this
> attribute where to stop. There are a *ton* of functions in GLib
> and GTK+ that return allocated memory. There are even more functions
> that have no side effects other than their return value. In either
> of these cases, not using the return value is definitely a bug.
> What's the criterion for adding the attribute, simply that we think
> it's likely that someone would make the mistake?

Isn't it enough of a rule to say that all functions that return new
references to objects or newly-allocated memory should be marked with
this attribute?

E.g. gtk_file_chooser_get_filename() would be one, but not


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