From 054338b4ff5a9faa458545eb5f3963c3ace3d8d7 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 23 Jan 2020 21:15:52 +0100 Subject: [PATCH] infoviewer: avoid possible compiler warnings -Waddress-of-packed-member Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f4e36b3a4e87abdb66b581e84355195a1a84ddc9 Author: Thilo Graf Date: 2020-01-23 (Thu, 23 Jan 2020) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index e12c586ff..35d5dbc8b 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1932,6 +1932,7 @@ void CInfoViewer::show_Data (bool calledFromEvent) } time_t jetzt = time (NULL); + time_t cur_start_time = info_CurrentNext.current_zeit.startzeit; const char *unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE); @@ -1953,7 +1954,7 @@ void CInfoViewer::show_Data (bool calledFromEvent) snprintf(runningRest, sizeof(runningRest), "%d +%d %s", info_CurrentNext.current_zeit.dauer / 60, -rest, unit_short_minute); } - struct tm *pStartZeit = localtime (&info_CurrentNext.current_zeit.startzeit); + struct tm *pStartZeit = localtime (&cur_start_time); snprintf (runningStart, sizeof(runningStart), "%02d:%02d", pStartZeit->tm_hour, pStartZeit->tm_min); } else last_curr_id = 0; @@ -1961,7 +1962,7 @@ void CInfoViewer::show_Data (bool calledFromEvent) if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_next) { unsigned dauer = info_CurrentNext.next_zeit.dauer / 60; snprintf (nextDuration, sizeof(nextDuration), "%d %s", dauer, unit_short_minute); - struct tm *pStartZeit = localtime (&info_CurrentNext.next_zeit.startzeit); + struct tm *pStartZeit = localtime (&cur_start_time); snprintf (nextStart, sizeof(nextStart), "%02d:%02d", pStartZeit->tm_hour, pStartZeit->tm_min); } else last_next_id = 0;