From ef3700f9c6845ce56d80607c5c667ca464466169 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan <fanchunwei@src.gnome.org> Date: Thu, 13 Sep 2018 18:12:15 +0800 Subject: [PATCH] tests: Fix build on pre-C99 compilers Make the tests also build on pre-c99 compilers, since the library itself builds on such compilers already. --- test/unicode-conformance/BidiCharacterTest.c | 3 ++- test/unicode-conformance/BidiTest.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unicode-conformance/BidiCharacterTest.c b/test/unicode-conformance/BidiCharacterTest.c index cf3f676..f832e4f 100644 --- a/test/unicode-conformance/BidiCharacterTest.c +++ b/test/unicode-conformance/BidiCharacterTest.c @@ -289,8 +289,9 @@ main (int argc, char **argv) die ("Failed opening %s\n", filename); while (!feof(channel)) { + int len; fgets(line, LINE_SIZE, channel); - int len = strlen(line); + len = strlen(line); if (len == LINE_SIZE-1) die("LINE_SIZE=%d too small at line %d!\n", LINE_SIZE, line_no); diff --git a/test/unicode-conformance/BidiTest.c b/test/unicode-conformance/BidiTest.c index 5f931f1..bad7a95 100644 --- a/test/unicode-conformance/BidiTest.c +++ b/test/unicode-conformance/BidiTest.c @@ -288,8 +288,9 @@ main (int argc, char **argv) die ("Failed opening %s\n", filename); while (!feof(channel)) { + int len; fgets(line, LINE_SIZE, channel); - int len = strlen(line); + len = strlen(line); if (len == LINE_SIZE-1) die("LINE_SIZE too small at line %d!\n", line_no); -- 2.40.0