channellist.cpp: fix possible compiler warnings -Waddress-of-packed-member

This commit is contained in:
2020-01-22 19:52:34 +01:00
parent 8ca78e4290
commit b817a0a819

View File

@@ -1731,7 +1731,8 @@ void CChannelList::paintDetails(int index)
if (!CurrentNext.next_name.empty()) { if (!CurrentNext.next_name.empty()) {
char buf[128] = {0}; char buf[128] = {0};
char cFrom[50] = {0}; // UTF-8 char cFrom[50] = {0}; // UTF-8
struct tm *pStartZeit = localtime (& CurrentNext.next_zeit.startzeit); time_t next_start_time = CurrentNext.next_zeit.startzeit;
struct tm *pStartZeit = localtime (&next_start_time);
snprintf(cFrom, sizeof(cFrom), "%s %02d:%02d",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min ); snprintf(cFrom, sizeof(cFrom), "%s %02d:%02d",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min );
snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str()); snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str());
int from_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cFrom); int from_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cFrom);