From e7c59501177f2fe00a575a37907603c451fd95b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Tue, 31 May 2016 08:24:23 +0200 Subject: [PATCH] Silenced a truncation warning in upper case table The upper case value for 0x1d79 is 0xa77d, so the difference is 0x8a04, which overflows in the table which defines the computation of upper case values. Rewriting this difference as -0x75fc leads to the same result in an upper case table truncated to two bytes, and this avoid the compiler warning. --- libntfs-3g/unistr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libntfs-3g/unistr.c b/libntfs-3g/unistr.c index 753acc08..54cfd469 100644 --- a/libntfs-3g/unistr.c +++ b/libntfs-3g/unistr.c @@ -1291,7 +1291,8 @@ void ntfs_upcase_table_build(ntfschar *uc, u32 uc_len) { 0x3c2, 0x3c2, 0x0, 2, 6, 1 }, { 0x3d7, 0x3d7, -0x8, 2, 6, 1 }, { 0x515, 0x523, -0x1, 2, 6, 1 }, - { 0x1d79, 0x1d79, 0x8a04, 2, 6, 1 }, + /* below, -0x75fc stands for 0x8a04 and truncation */ + { 0x1d79, 0x1d79, -0x75fc, 2, 6, 1 }, { 0x1efb, 0x1eff, -0x1, 2, 6, 1 }, { 0x1fc3, 0x1ff3, 0x9, 48, 6, 1 }, { 0x1fcc, 0x1ffc, 0x0, 48, 6, 1 },