From e3e6d58cadefbe55160535679d8b6c93c72e8e3e Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 31 Jul 2020 16:03:21 +0200 Subject: Use %zd for size-type formatting in unicode table generator Qt6 makes sizes qsizetype; and one of these was already sizeof()-sized. While qsizetype might not be ssize_t, it's at least no bigger, so we can safely use its format specifier, with a suitable cast. Change-Id: I433f654f6b139d74b4d5358b804b44ab1f0ada15 Reviewed-by: Lars Knoll Reviewed-by: Konstantin Ritt --- util/unicode/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 98580fcb77..34274053d9 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -2295,7 +2295,7 @@ static void computeUniqueProperties() } d.propertyIndex = index; } - qDebug(" %d unique unicode properties found", uniqueProperties.size()); + qDebug(" %zd unique unicode properties found", ssize_t(uniqueProperties.size())); } struct UniqueBlock { @@ -2592,7 +2592,7 @@ static QByteArray createSpecialCaseMap() out += QByteArray::number(maxN); out += ";\n\n\n"; - qDebug(" memory usage: %ld bytes", specialCaseMap.size()*sizeof(unsigned short)); + qDebug(" memory usage: %zd bytes", ssize_t(specialCaseMap.size() * sizeof(unsigned short))); return out; } -- cgit v1.2.3