From 9fee05f0622284fd40358dadbc20e3e9ed532abc Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 16 Sep 2024 22:40:40 +0200 Subject: [PATCH] unilbrk tests: Avoid two gcc -Wparentheses warnings. * tests/unilbrk/test-uc-possible-linebreaks.c (main): Add redundant parentheses. --- ChangeLog | 6 ++++++ tests/unilbrk/test-uc-possible-linebreaks.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a619271ded..792ca33836 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-09-16 Bruno Haible + + unilbrk tests: Avoid two gcc -Wparentheses warnings. + * tests/unilbrk/test-uc-possible-linebreaks.c (main): Add redundant + parentheses. + 2024-09-16 Paul Eggert parse-datetime no longer depends on nstrftime diff --git a/tests/unilbrk/test-uc-possible-linebreaks.c b/tests/unilbrk/test-uc-possible-linebreaks.c index cebead6723..31bab9eb15 100644 --- a/tests/unilbrk/test-uc-possible-linebreaks.c +++ b/tests/unilbrk/test-uc-possible-linebreaks.c @@ -148,9 +148,9 @@ main (int argc, char *argv[]) the space. Similarly when the first two characters at the start of the text have property LBP_CM and LBP_ZWJ, respectively. (LB9). */ - if (!(((j == 1 || (j > 1 && (input[j - 2] >= 0x000A && input[j - 2] <= 0x000D || input[j - 2] == 0x0085))) + if (!(((j == 1 || (j > 1 && ((input[j - 2] >= 0x000A && input[j - 2] <= 0x000D) || input[j - 2] == 0x0085))) && input[j - 1] == 0x0020) - || ((j == 2 || (j > 2 && (input[j - 3] >= 0x000A && input[j - 3] <= 0x000D || input[j - 3] == 0x0085))) + || ((j == 2 || (j > 2 && ((input[j - 3] >= 0x000A && input[j - 3] <= 0x000D) || input[j - 3] == 0x0085))) && ((input[j - 2] == 0x0020 && input[j - 1] == 0x0020) || (input[j - 2] == 0x0308 && input[j - 1] == 0x200D) || (input[j - 2] == 0x200D && input[j - 1] == 0x0308))))) -- 2.39.5