From 644ddec13722fcaff125f406212ff2fac23c11e4 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 6 Sep 2023 00:48:09 -0500 Subject: [PATCH] Bugfix: Problems exposed by clang-13. The Vedic Extensions Unicode checks are out of order. Remove unused "last" variable from private_fl_utf_file_write_until(). --- level_0/f_utf/c/private-utf_combining.c | 8 ++++---- level_1/fl_utf_file/c/private-utf_file.c | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/level_0/f_utf/c/private-utf_combining.c b/level_0/f_utf/c/private-utf_combining.c index f851bc5..d919041 100644 --- a/level_0/f_utf/c/private-utf_combining.c +++ b/level_0/f_utf/c/private-utf_combining.c @@ -668,8 +668,8 @@ extern "C" { return F_true; } - // Vedic Extensions: U+1CD4 to U+1CD2. - if (sequence >= 0xe1b39400 && sequence <= 0xe1b39200) { + // Vedic Extensions: U+1CD2 to U+1CD4. + if (sequence >= 0xe1b39200 && sequence <= 0xe1b39400) { return F_true; } @@ -688,8 +688,8 @@ extern "C" { return F_true; } - // Vedic Extensions: U+1DC0 to U+1CE8. - if (sequence >= 0xe1b78000 && sequence <= 0xe1b3a800) { + // Vedic Extensions: U+1CE8 to U+1DC0. + if (sequence >= 0xe1b3a800 && sequence <= 0xe1b78000) { return F_true; } diff --git a/level_1/fl_utf_file/c/private-utf_file.c b/level_1/fl_utf_file/c/private-utf_file.c index 73fc93c..66ece3b 100644 --- a/level_1/fl_utf_file/c/private-utf_file.c +++ b/level_1/fl_utf_file/c/private-utf_file.c @@ -82,7 +82,6 @@ extern "C" { write_size = write_max; } - f_number_unsigned_t last = 0; f_number_unsigned_t used = 0; ssize_t size_write = 0; @@ -177,7 +176,6 @@ extern "C" { } *written += i; - last += used; if (*written + write_size > write_max) { write_size = write_max - *written; -- 1.8.3.1