From c82bfbaec28fe6d3403794a1b593553b5282eee7 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 10 Nov 2013 19:48:58 +0100 Subject: [PATCH] fix format string warnings --- src/gui/components/Makefile.am | 2 +- src/gui/components/cc_item_picture.cpp | 2 +- src/gui/update.cpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/components/Makefile.am b/src/gui/components/Makefile.am index 352515250..4b4d26d01 100644 --- a/src/gui/components/Makefile.am +++ b/src/gui/components/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -fno-rtti -fno-exceptions +AM_CPPFLAGS = -fno-rtti -fno-exceptions -D__STDC_FORMAT_MACROS AM_CPPFLAGS += \ -I$(top_builddir) \ diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 6ccc94de6..1b5f51a3a 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -248,7 +248,7 @@ void CComponentsChannelLogo::initVarPictureChannellLogo() pic_name = tmp_logo; // #ifdef DEBUG_CC - printf(" [CComponentsChannelLogo] %s: init image: %s (has_logo=%d, channel_id=%lld)\n", __FUNCTION__, pic_name.c_str(), has_logo, channel_id); + printf("\t[CComponentsChannelLogo] %s: init image: %s (has_logo=%d, channel_id=%" PRIu64 ")\n", __func__, pic_name.c_str(), has_logo, channel_id); // #endif initVarPicture(); diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 471b3f19f..220b00f7f 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -598,7 +598,8 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile) uint64_t backupMaxSize = (btotal - bused) * (uint64_t)bsize; uint64_t res = 10; // Reserved 10% of available space backupMaxSize = (backupMaxSize - ((backupMaxSize * res) / 100ULL)) / 1024ULL; - printf("##### [%s] backupMaxSize: %llu, btotal: %llu, bused: %llu, bsize: %ld\n", __FUNCTION__, backupMaxSize, btotal, bused, bsize); + printf("##### [%s] backupMaxSize: %" PRIu64 ", btotal: %" PRIu64 ", bused: %" PRIu64 ", bsize: %ld\n", + __func__, backupMaxSize, btotal, bused, bsize); if (backupMaxSize < backupRequiredSize) { snprintf(errMsg, sizeof(errMsg)-1, g_Locale->getText(LOCALE_FLASHUPDATE_READ_NO_AVAILABLE_SPACE), path.c_str(), backupMaxSize, backupRequiredSize);