From: Lars Op den Kamp Date: Tue, 14 Feb 2012 10:39:20 +0000 (+0100) Subject: platform: let CTimeout return uint32_t instead of uint64_t. fixes compilation warning X-Git-Tag: upstream/2.2.0~1^2~35^2~61 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=78850b01b90c5aaacc49f523270fbbdcd7e600a7;p=deb_libcec.git platform: let CTimeout return uint32_t instead of uint64_t. fixes compilation warning --- diff --git a/src/lib/platform/threads/mutex.h b/src/lib/platform/threads/mutex.h index 11e3606..4a0c331 100644 --- a/src/lib/platform/threads/mutex.h +++ b/src/lib/platform/threads/mutex.h @@ -261,7 +261,7 @@ namespace PLATFORM if (!predicate) { CTimeout timeout(iTimeout); - uint64_t iMsLeft(0); + uint32_t iMsLeft(0); bReturn = false; while (!bReturn) { diff --git a/src/lib/platform/util/timeutils.h b/src/lib/platform/util/timeutils.h index 985712a..3b1ef70 100644 --- a/src/lib/platform/util/timeutils.h +++ b/src/lib/platform/util/timeutils.h @@ -113,10 +113,10 @@ namespace PLATFORM bool IsSet(void) const { return m_iTarget > 0; } void Init(uint32_t iTimeout) { m_iTarget = GetTimeMs() + iTimeout; } - uint64_t TimeLeft(void) const + uint32_t TimeLeft(void) const { uint64_t iNow = GetTimeMs(); - return (iNow > m_iTarget) ? 0 : m_iTarget - iNow; + return (iNow > m_iTarget) ? 0 : (uint32_t)(m_iTarget - iNow); } private: