Re: [patch] add G_GNUC_WARNUNCHECKED define



Sven Neumann wrote:
> Federico Mena Quintero <federico ximian com> writes:
> 
> > 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
> > gtk_entry_get_text().
> 
> We already have G_CONST_RETURN to indicate this difference. Do you
> really want to clutter the API with G_GNUC_WARNUNCHECKED? I don't
> think that's a good idea in general even though it would certainly be
> correct.

G_CONST_RETURN is something entirely different from the
proposed G_GNUC_WARNUNCHECKED. It would have saved me quite
some time if the compiler had warned me that I forgot the
store the result of g_list_append().

Regards,
Johannes



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