From a884b8def6bc203c16ac3457ee5f402a737704c2 Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Tue, 20 Jun 2017 09:33:59 +0200 Subject: [PATCH] fix bstest The last case in test0_2 misses __LINE__. Cast non-matching pointer-sign for dumpCstring() --- bstest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bstest.c b/bstest.c index 773768d..b84bf96 100644 --- a/bstest.c +++ b/bstest.c @@ -178,7 +178,7 @@ int ret = 0; printf ("[%d] i = %d, j = %d, l = %d, k = %d, b->slen = %d\n", __LINE__, i, j, l, k, b->slen); ret++; } else if (0 != memcmp (t, b->data, l-k+1)) { - printf ("[%d] \"%s\" != \"%s\"\n", b->data, t); + printf ("[%d] \"%s\" != \"%s\"\n", __LINE__, b->data, t); ret++; } bdestroy (b); @@ -632,7 +632,7 @@ static int test47_0 (const struct tagbstring* b, const unsigned char* blk, int l int rv, ret = 0; ret += (res != (rv = biseqblk (b, blk, len))); - printf (".\tbiseqblk (%s, %s) = %d\n", dumpBstring (b), dumpCstring (blk), rv); + printf (".\tbiseqblk (%s, %s) = %d\n", dumpBstring (b), dumpCstring ((const char*)blk), rv); if (ret) { printf ("\t\tfailure(%d) = %d (res = %d)\n", __LINE__, ret, res); } @@ -3037,7 +3037,7 @@ static int test48_0 (const_bstring b, const unsigned char * blk, int len, int re int rv, ret = 0; ret += (res != (rv = biseqcaselessblk (b, blk, len))); - printf (".\tbiseqcaselessblk (%s, %s, %d) = %d\n", dumpBstring (b), dumpCstring (blk), len, rv); + printf (".\tbiseqcaselessblk (%s, %s, %d) = %d\n", dumpBstring (b), dumpCstring ((const char*)blk), len, rv); if (ret) { printf ("\t\tfailure(%d) = %d (res = %d)\n", __LINE__, ret, res); }