Be more clear that g_return_if_fail is undefined behaviour
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 6 Feb 2014 10:19:47 +0000 (10:19 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 11 Feb 2014 15:01:58 +0000 (15:01 +0000)
commita3cb5ce33b636dd31ac009d5396997dfbb0b032c
tree2d9375f73ff396419883be7f09ebb75e39985598
parentf5e60984af7ae056c9795d4820834707520866ed
Be more clear that g_return_if_fail is undefined behaviour

In particular, it is not incorrect to g_return_if_fail (..., FALSE)
in a function returning a "success" gboolean and a GError: "failure to
meet the preconditions is an error" takes precedence over the
GError documentation's guarantee that the error will be set on failure.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=660809
Reviewed-by: Emmanuele Bassi
glib/gerror.c
glib/gmessages.h