summaryrefslogtreecommitdiff
path: root/dbug/tests.c
diff options
context:
space:
mode:
authorunknown <monty@nosik.monty.fi>2008-02-13 21:37:29 +0200
committerunknown <monty@nosik.monty.fi>2008-02-13 21:37:29 +0200
commit2c68346184967930262714456963ae48278c38d5 (patch)
tree734c5190674bb5583225ef52569a4a77a7320ebc /dbug/tests.c
parent23ea83da18d172add0a71cd59a1ab88b09fc0ea4 (diff)
parent0e4659bcd118842e494ffd3cac5897cc2d475295 (diff)
downloadmariadb-git-2c68346184967930262714456963ae48278c38d5.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-maria
into mysql.com:/home/my/mysql-maria
Diffstat (limited to 'dbug/tests.c')
-rw-r--r--dbug/tests.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/dbug/tests.c b/dbug/tests.c
index edb999c0c60..d76266d34a3 100644
--- a/dbug/tests.c
+++ b/dbug/tests.c
@@ -2,10 +2,6 @@
A program to test DBUG features. Used by tests-t.pl
*/
-#ifdef DBUG_OFF /* We are testing dbug */
-#undef DBUG_OFF
-#endif
-
char *push1=0;
#include <my_global.h> /* This includes dbug.h */
@@ -42,6 +38,12 @@ int func1()
int main (int argc, char *argv[])
{
int i;
+#ifdef DBUG_OFF
+ return 1;
+#endif
+ if (argc == 1)
+ return 0;
+
#if defined(HAVE_PTHREAD_INIT) && defined(THREAD)
pthread_init(); /* Must be called before DBUG_ENTER */
#endif
@@ -75,7 +77,7 @@ int main (int argc, char *argv[])
DBUG_EVALUATE_IF("evaluate_if", "ON", "OFF"));
DBUG_EXECUTE_IF("pop", DBUG_POP(); );
{
- char s[1000];
+ char s[1000] __attribute__((unused));
DBUG_EXPLAIN(s, sizeof(s)-1);
DBUG_PRINT("explain", ("dbug explained: %s", s));
}