summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@redhat.com>2010-02-13 09:40:33 -0500
committerSøren Sandmann Pedersen <sandmann@redhat.com>2010-02-13 11:28:33 -0500
commitedee4be052cf0d466922759efd2613e5a2be9e2b (patch)
tree67ed4c45f13b5ab0734cfc9189e44af6049f01e7
parentcf1f034fef34478c528bedf1e59be443fa72429c (diff)
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.
-rw-r--r--pixman/pixman-region.c35
1 files changed, 12 insertions, 23 deletions
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"