eitd/sectionsd.cpp: Fix format specifiers for platform independence

- Changed format specifiers from %ld to %" PRId64 " for time-related
  variables to ensure cross-platform compatibility.
- Updated format specifiers from %lx to %" PRIx64 " for consistency
  with 64-bit integers.
- Added casts to `int64_t` for accurate formatting.

This changes should address format warnings and ensure correct behavior on
systems with 64-bit integers.
This commit is contained in:
2024-07-04 16:08:36 +02:00
parent 13860167ca
commit e1ee972d75

View File

@@ -1775,7 +1775,7 @@ bool CCNThread::shouldSleep()
* and only skipTime should send CNThread finally to sleep if eit_version is not found */
time_t since = time_monotonic() - lastChanged;
if (since > skipTime) {
debug(DEBUG_ERROR, "%s::%s timed out after %lds -> going to sleep", name.c_str(), __func__, since);
debug(DEBUG_ERROR, "%s::%s timed out after %" PRId64 "s -> going to sleep", name.c_str(), __func__, static_cast<int64_t>(since));
return true;
}
/* retry */
@@ -2772,7 +2772,7 @@ bool CEitManager::getEPGidShort(t_event_id epg_id, CShortEPGData * epgdata)
bool CEitManager::getEPGid(const t_event_id epg_id, const time_t startzeit, CEPGData * epgdata)
{
bool ret = false;
debug(DEBUG_INFO, "Request of actual EPG for 0x%" PRIx64 " 0x%lx", epg_id, startzeit);
debug(DEBUG_INFO, "Request of actual EPG for 0x%" PRIx64 " 0x%" PRIx64, epg_id, static_cast<uint64_t>(startzeit));
const SIevent& evt = findSIeventForEventUniqueKey(epg_id);