From: Søren Sandmann Pedersen Date: Sat, 13 Feb 2010 14:40:33 +0000 (-0500) Subject: Turn off asserts in development snapshots (bug 26314). X-Git-Tag: pixman-0.17.6~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=edee4be052cf0d466922759efd2613e5a2be9e2b;p=platform%2Fupstream%2Fpixman.git Turn off asserts in development snapshots (bug 26314). There is not much real benefit in having asserts turned on in snapshots because it doesn't lead to any new bug reports, just to people not installing development snapshots since they case X server crashes. So just turn them off. While we are at it, limit the number of messages to stderr to 5 instead of 50. --- diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index ec2ddf8..9f7515c 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -68,32 +68,21 @@ /* Turn on debugging depending on what type of release this is */ - -#if ((PIXMAN_VERSION_MICRO % 2) == 1) -/* Random git checkout. - * - * Those are often used for performance work, so we don't turn on the - * full self-checking, but we do turn on the asserts. - */ -# define FATAL_BUGS -# define noSELF_CHECKS -#elif ((PIXMAN_VERSION_MINOR % 2) == 0) -/* Stable release. - * - * We don't want assertions because the X server should stay alive - * if possible. We also don't want self-checks for performance-reasons. +#if (((PIXMAN_VERSION_MICRO % 2) == 0) && ((PIXMAN_VERSION_MINOR % 2) == 1)) +/* This is a development snapshot, so we want self-checking in order to + * catch as many bugs as possible. However, we don't turn on the asserts + * because that just leads to the X server crashing which leads to + * people not running the snapshots. */ # define noFATAL_BUGS -# define noSELF_CHECKS +# define SELF_CHECKS #else -/* Development snapshot. - * - * These are the things that get shipped in development distributions - * such as Rawhide. We want both self-checking and fatal assertions - * to catch as many bugs as possible. +/* This is either a stable release or a random git checkout. We don't + * want self checks in either case for performance reasons. (Random + * git checkouts are often used for performance work */ -# define FATAL_BUGS -# define SELF_CHECKS +# define noFATAL_BUGS +# define noSELF_CHECKS #endif #ifndef FATAL_BUGS @@ -110,7 +99,7 @@ log_region_error (const char *function, const char *message) { static int n_messages = 0; - if (n_messages < 50) + if (n_messages < 5) { fprintf (stderr, "*** BUG ***\n"