diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-07-29 19:52:43 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-07 16:50:47 +0200 |
commit | a00e68d5486a9382988a1ca25c52a305c8a020bf (patch) | |
tree | 1c82f977e9f4a5d8a51362bd313d581e05338ad3 | |
parent | b233f929d9a6afd8effd175dbc8d27db079ecb5c (diff) |
Build tests with -pedantic
Reviewed-by: dogma
-rw-r--r-- | test/unit/cookies.c | 4 | ||||
-rw-r--r-- | test/unit/unicode_test.cc | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/unit/cookies.c b/test/unit/cookies.c index 923f5227..ce122ffc 100644 --- a/test/unit/cookies.c +++ b/test/unit/cookies.c @@ -277,12 +277,12 @@ static int Dpi_check_dpid(int num_tries) static int Dpi_blocking_start_dpid(void) { int cst, try = 0, - n_tries = 12; /* 3 seconds */ + n_tries = 3; /* 3 seconds */ /* test the dpid, and wait a bit for it to start if necessary */ while ((cst = Dpi_check_dpid(n_tries)) == 1) { MSG("Dpi_blocking_start_dpid: try %d\n", ++try); - usleep(250000); /* 1/4 sec */ + sleep(1); /* 1/4 sec */ } return cst; } diff --git a/test/unit/unicode_test.cc b/test/unit/unicode_test.cc index 0824cdd0..ffcc1627 100644 --- a/test/unit/unicode_test.cc +++ b/test/unit/unicode_test.cc @@ -32,7 +32,7 @@ int main (int argc, char *argv[]) // not 0-terminated; copy from 0-terminated int t2len = strlen (t1); - char t2[t2len]; + char *t2 = new char[t2len]; for (int i = 0; i < t2len; i++) t2[i] = t1[i]; @@ -54,5 +54,7 @@ int main (int argc, char *argv[]) printf ("%3d -> U+%04x\n", (int)(s - t2), decodeUtf8(s, t2len - (s - t2))); + delete[] t2; + return 0; } |