summaryrefslogtreecommitdiff
path: root/test/testu.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2021-04-26 17:34:16 +0200
committerJörg Frings-Fürst <debian@jff.email>2021-04-26 17:34:16 +0200
commiteac65ba44805c402f894b700b602c2e891f92a84 (patch)
tree8c74372bd97a480de440013af1dda4958189e24e /test/testu.c
parent7ce72ba4d420fde9672c2fb2dd7a6f5a26815e26 (diff)
parentdbedac4783f09292abb187d0c59d4032594038b6 (diff)
Merge branch 'release/debian/6.9.6-1'debian/6.9.6-1
Diffstat (limited to 'test/testu.c')
-rw-r--r--test/testu.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/testu.c b/test/testu.c
index 24397ab..c1971e7 100644
--- a/test/testu.c
+++ b/test/testu.c
@@ -14,6 +14,10 @@ static int nsucc = 0;
static int nfail = 0;
static int nerror = 0;
+#ifdef __TRUSTINSOFT_ANALYZER__
+static int nall = 0;
+#endif
+
static FILE* err_file;
#ifndef POSIX_TEST
@@ -36,7 +40,7 @@ static void uconv(char* from, char* to, int len)
if (c == 0) {
c = (unsigned char )from[i+1];
if (c < 0x20 || c >= 0x7f || c == 0x5c || c == 0x22) {
- sprintf(q, "\\%03o", c);
+ sprintf(q, "\\%03o", (unsigned int )c);
q += 4;
}
else {
@@ -45,10 +49,10 @@ static void uconv(char* from, char* to, int len)
}
}
else {
- sprintf(q, "\\%03o", c);
+ sprintf(q, "\\%03o", (unsigned int )c);
q += 4;
c = (unsigned char )from[i+1];
- sprintf(q, "\\%03o", c);
+ sprintf(q, "\\%03o", (unsigned int )c);
q += 4;
}
}
@@ -58,6 +62,10 @@ static void uconv(char* from, char* to, int len)
static void xx(char* pattern, char* str, int from, int to, int mem, int not)
{
+#ifdef __TRUSTINSOFT_ANALYZER__
+ if (nall++ % TIS_TEST_CHOOSE_MAX != TIS_TEST_CHOOSE_CURRENT) return;
+#endif
+
int r;
char cpat[4000], cstr[4000];