[Spice-devel] [PATCH 11/18] worker: use spice_return_if_fail() instead of spice_assert() in release_item

Christophe Fergeau cfergeau at redhat.com
Tue Nov 24 05:39:32 PST 2015


Hey,

On Tue, Nov 24, 2015 at 08:03:45AM -0500, Frediano Ziglio wrote:
> Did you try it? By default you set the abort level to SPICE_LOG_LEVEL_WARNING.

Not heavily tested, in particular the abort level path. I tested a bit
the logging level paths, and this seemed to work. But this is just an
initial proof of concept, this needs more work (if worth it), more extensive testing
will go with it.
abort_level = SPICE_LOG_LEVEL_WARNING; is a c&p typo.

> You should probably call g_log_set_always_fatal even for default setting.

By default (ie nothing specified), I don't want to override glib
defaults, I want the behaviour to be what you'd expect from a glib app.
An exception to that is spice_return_if_fail() which must keep
asserting

> I would also make sure that G_DISABLE_CHECKS is not defined, I imagine this could
> be done adding an "#undef G_DISABLE_CHECKS" to the config.h.

Or a
#ifdef G_DISABLE_CHECKS
#error G_DISABLE_CHECKS must be disabled when compiling spice-common
#endif

in log.h

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151124/21a6c14f/attachment.sig>


More information about the Spice-devel mailing list