timermanager.cpp: Fix format specifiers

- Changed format specifiers from %ld to %" PRId64 " for `time_t` variables
  to ensure compatibility across different platforms.
- Cast `time_t` variables to `int64_t` for proper formatting.
- Updated printf statements and debug macros accordingly.
- Fixes some translations and code formatting.
This commit is contained in:
2024-07-04 16:08:36 +02:00
parent e1ee972d75
commit fff91ea5f3

View File

@@ -774,18 +774,18 @@ bool CTimerManager::shutdown()
for (; pos != events.end(); ++pos) for (; pos != events.end(); ++pos)
{ {
CTimerEvent *event = pos->second; CTimerEvent *event = pos->second;
dprintf("shutdown: timer type %d state %d announceTime: %ld\n", event->eventType, event->eventState, event->announceTime); dprintf("shutdown: timer type %d state %d announceTime: %" PRId64 "\n", event->eventType, event->eventState, (int64_t)event->announceTime);
bool standby_on_timer = (event->eventType == CTimerd::TIMER_STANDBY && static_cast<CTimerEvent_Standby*>(event)->standby_on);// wakeup without CEC-on from depstanby bool standby_on_timer = (event->eventType == CTimerd::TIMER_STANDBY && static_cast<CTimerEvent_Standby*>(event)->standby_on); // wakeup without CEC-on from deep standby
if ((event->eventType == CTimerd::TIMER_RECORD || if ((event->eventType == CTimerd::TIMER_RECORD ||
event->eventType == CTimerd::TIMER_ZAPTO || standby_on_timer) && event->eventType == CTimerd::TIMER_ZAPTO || standby_on_timer) &&
event->eventState < CTimerd::TIMERSTATE_ISRUNNING) event->eventState < CTimerd::TIMERSTATE_ISRUNNING)
{ {
// Wir wachen nur f<EFBFBD>r Records und Zaptos und Stanby-ON wieder auf // We wake up only for Records and Zaptos and Standby-ON
if (event->announceTime < nextAnnounceTime || nextAnnounceTime == 0) if (event->announceTime < nextAnnounceTime || nextAnnounceTime == 0)
{ {
nextAnnounceTime = event->announceTime; nextAnnounceTime = event->announceTime;
dprintf("shutdown: nextAnnounceTime %ld\n", nextAnnounceTime); dprintf("shutdown: nextAnnounceTime %" PRId64 "\n", (int64_t)nextAnnounceTime);
if (event->eventType == CTimerd::TIMER_RECORD || standby_on_timer) if (event->eventType == CTimerd::TIMER_RECORD || standby_on_timer)
timer_is_rec = true; timer_is_rec = true;
else else
@@ -799,7 +799,7 @@ bool CTimerManager::shutdown()
{ {
timer_minutes = (nextAnnounceTime - 3 * 60) / 60; timer_minutes = (nextAnnounceTime - 3 * 60) / 60;
} }
dprintf("shutdown: timeset: %d timer_minutes %ld\n", timeset, timer_minutes); dprintf("shutdown: timeset: %d timer_minutes %" PRId64 "\n", timeset, (int64_t)timer_minutes);
if (rc == 0) if (rc == 0)
pthread_mutex_unlock(&tm_eventsMutex); pthread_mutex_unlock(&tm_eventsMutex);
return status; return status;