mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
SIevents: fix C++11 compiler warning
The slightly obscure code caused the following warning:
SIevents.cpp:280:148: warning: narrowing conversion of
‘tolower(((int)evt->descr_extended_event_header::
iso_639_2_language_code_lo))’
from ‘int’ to ‘char’ inside { } is ill-formed in C++11
[-Wnarrowing]
Origin commit data
------------------
Branch: ni/coolstream
Commit: 0a8ef1c058
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-11-03 (Sat, 03 Nov 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -250,7 +250,11 @@ void SIevent::parseShortEventDescriptor(const uint8_t *buf, unsigned maxlen)
|
||||
|
||||
int tsidonid = (transport_stream_id << 16) | original_network_id;
|
||||
|
||||
char lang[] = {tolower(evt->language_code_hi), tolower(evt->language_code_mid), tolower(evt->language_code_lo), '\0'};
|
||||
char lang[4];
|
||||
lang[0] = tolower(evt->language_code_hi);
|
||||
lang[1] = tolower(evt->language_code_mid);
|
||||
lang[2] = tolower(evt->language_code_lo);
|
||||
lang[3] = '\0';
|
||||
std::string language(lang);
|
||||
int table = getCountryCodeDefaultMapping(language);
|
||||
|
||||
@@ -273,7 +277,11 @@ void SIevent::parseExtendedEventDescriptor(const uint8_t *buf, unsigned maxlen)
|
||||
|
||||
int tsidonid = (transport_stream_id << 16) | original_network_id;
|
||||
|
||||
char lang[] = {tolower(evt->iso_639_2_language_code_hi), tolower(evt->iso_639_2_language_code_mid), tolower(evt->iso_639_2_language_code_lo), '\0'};
|
||||
char lang[4];
|
||||
lang[0] = tolower(evt->iso_639_2_language_code_hi);
|
||||
lang[1] = tolower(evt->iso_639_2_language_code_mid);
|
||||
lang[2] = tolower(evt->iso_639_2_language_code_lo);
|
||||
lang[3] = '\0';
|
||||
std::string language(lang);
|
||||
int table = getCountryCodeDefaultMapping(language);
|
||||
|
||||
|
Reference in New Issue
Block a user