From dd67b1cfe93fee8cf13e2ca86513a6474d3e2cd6 Mon Sep 17 00:00:00 2001 From: Yunli Liu Date: Sun, 11 Feb 2024 09:02:20 +0800 Subject: [PATCH] fix arm64 compile err: format specifies 'int' but type 'size_t' ../../base/global/i18n/frameworks/intl/src/holiday_manager.cpp:57:72: error: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat] HiLog::Error(LABEL, "Failed: strftime error:%{public}d .", resCode); ~~~~~~~~~~ ^~~~~~~ %zu 1 error generated. Change-Id: I8450396c5e27ef772293d428878d8889a950a2a1 Signed-off-by: Yunli Liu --- frameworks/intl/src/holiday_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/intl/src/holiday_manager.cpp b/frameworks/intl/src/holiday_manager.cpp index a5a86973..3ae6f0cf 100644 --- a/frameworks/intl/src/holiday_manager.cpp +++ b/frameworks/intl/src/holiday_manager.cpp @@ -54,7 +54,7 @@ HolidayManager::HolidayManager(const char* path) char strDate[10]; size_t resCode = strftime(strDate, sizeof(strDate), "%Y%m%d", &tmObj); if (resCode == 0) { - HiLog::Error(LABEL, "Failed: strftime error:%{public}d .", resCode); + HiLog::Error(LABEL, "Failed: strftime error:%{public}zu .", resCode); return; } std::string startDate(strDate); -- Gitee