-pedantic fixes

This commit is contained in:
satbaby
2012-05-08 18:59:11 +02:00
parent 25563a2029
commit e14fc80ed5
10 changed files with 45 additions and 31 deletions

View File

@@ -23,7 +23,7 @@ enum CA_INIT_MASK {
enum CA_SLOT_TYPE { enum CA_SLOT_TYPE {
CA_SLOT_TYPE_SMARTCARD, CA_SLOT_TYPE_SMARTCARD,
CA_SLOT_TYPE_CI, CA_SLOT_TYPE_CI,
CA_SLOT_TYPE_ALL, CA_SLOT_TYPE_ALL
}; };
enum CA_MESSAGE_FLAGS { enum CA_MESSAGE_FLAGS {
@@ -49,7 +49,7 @@ enum CA_MESSAGE_FLAGS {
CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19), CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19),
CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20), CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20),
CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21), CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21),
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22), CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22)
}; };
enum CA_MESSAGE_MSGID { enum CA_MESSAGE_MSGID {
@@ -72,7 +72,7 @@ enum CA_MESSAGE_MSGID {
CA_MESSAGE_MSG_EMM_ARRIVED, CA_MESSAGE_MSG_EMM_ARRIVED,
CA_MESSAGE_MSG_CHANNEL_CHANGE, CA_MESSAGE_MSG_CHANNEL_CHANGE,
CA_MESSAGE_MSG_GUI_READY, CA_MESSAGE_MSG_GUI_READY,
CA_MESSAGE_MSG_EXIT, CA_MESSAGE_MSG_EXIT
}; };
typedef struct CA_MESSAGE { typedef struct CA_MESSAGE {

View File

@@ -30,7 +30,7 @@ enum CS_LOG_MODULE {
CS_LOG_POWER_CLK, CS_LOG_POWER_CLK,
CS_LOG_MEM, CS_LOG_MEM,
CS_LOG_API, CS_LOG_API,
CS_LOG_CA, CS_LOG_CA
}; };
// Initialization // Initialization

View File

@@ -255,7 +255,7 @@ class CRCInput
RC_HW_COOLSTREAM = 0, RC_HW_COOLSTREAM = 0,
RC_HW_DBOX = 1, RC_HW_DBOX = 1,
RC_HW_PHILIPS = 2, RC_HW_PHILIPS = 2,
RC_HW_TRIPLEDRAGON = 3, RC_HW_TRIPLEDRAGON = 3
}; };
void set_rc_hw(void); void set_rc_hw(void);

View File

@@ -64,7 +64,7 @@ enum record_error_msg_t
RECORD_BUSY = -1, RECORD_BUSY = -1,
RECORD_INVALID_DIRECTORY = -2, RECORD_INVALID_DIRECTORY = -2,
RECORD_INVALID_CHANNEL = -3, RECORD_INVALID_CHANNEL = -3,
RECORD_FAILURE = -4, RECORD_FAILURE = -4
}; };
class CRecordInstance class CRecordInstance
@@ -167,7 +167,7 @@ class CRecordManager : public CMenuTarget, public CChangeObserver
RECMODE_OFF = 0, RECMODE_OFF = 0,
RECMODE_REC = 1, RECMODE_REC = 1,
RECMODE_TSHIFT = 2, RECMODE_TSHIFT = 2,
RECMODE_REC_TSHIFT = 3, RECMODE_REC_TSHIFT = 3
}; };
CRecordManager(); CRecordManager();

View File

@@ -280,7 +280,7 @@ CMenuGlobal::CMenuGlobal()
CMenuGlobal::~CMenuGlobal() CMenuGlobal::~CMenuGlobal()
{ {
v_selected.clear(); v_selected.clear();
}; }
//Note: use only singleton to create an instance in the constructor or init handler of menu widget //Note: use only singleton to create an instance in the constructor or init handler of menu widget
CMenuGlobal* CMenuGlobal::getInstance() CMenuGlobal* CMenuGlobal::getInstance()

View File

@@ -449,7 +449,7 @@ class CMenuWidget : public CMenuTarget
BTN_TYPE_BACK = 0, BTN_TYPE_BACK = 0,
BTN_TYPE_CANCEL = 1, BTN_TYPE_CANCEL = 1,
BTN_TYPE_NEXT = 3, BTN_TYPE_NEXT = 3,
BTN_TYPE_NO = -1, BTN_TYPE_NO = -1
}; };
virtual void addIntroItems(neutrino_locale_t subhead_text = NONEXISTANT_LOCALE, neutrino_locale_t section_text = NONEXISTANT_LOCALE, int buttontype = BTN_TYPE_BACK ); virtual void addIntroItems(neutrino_locale_t subhead_text = NONEXISTANT_LOCALE, neutrino_locale_t section_text = NONEXISTANT_LOCALE, int buttontype = BTN_TYPE_BACK );
bool hasItem(); bool hasItem();
@@ -476,7 +476,7 @@ class CMenuWidget : public CMenuTarget
MENU_POS_TOP_LEFT , MENU_POS_TOP_LEFT ,
MENU_POS_TOP_RIGHT , MENU_POS_TOP_RIGHT ,
MENU_POS_BOTTOM_LEFT , MENU_POS_BOTTOM_LEFT ,
MENU_POS_BOTTOM_RIGHT , MENU_POS_BOTTOM_RIGHT
}; };
}; };

View File

@@ -1463,6 +1463,6 @@ typedef enum
LOCALE_ZAPITSETUP_LAST_RADIO, LOCALE_ZAPITSETUP_LAST_RADIO,
LOCALE_ZAPITSETUP_LAST_TV, LOCALE_ZAPITSETUP_LAST_TV,
LOCALE_ZAPITSETUP_LAST_USE, LOCALE_ZAPITSETUP_LAST_USE,
LOCALE_ZAPTOTIMER_ANNOUNCE, LOCALE_ZAPTOTIMER_ANNOUNCE
} neutrino_locale_t; } neutrino_locale_t;
#endif #endif

View File

@@ -478,7 +478,7 @@ void CFEManager::setLiveFE(CFrontend * fe)
if(femap.size() > 1) if(femap.size() > 1)
cDemux::SetSource(0, livefe->fenumber); cDemux::SetSource(0, livefe->fenumber);
mutex.unlock(); mutex.unlock();
}; }
bool CFEManager::canTune(CZapitChannel * channel) bool CFEManager::canTune(CZapitChannel * channel)
{ {

View File

@@ -200,11 +200,14 @@ bool CBat::Parse()
#ifdef DEBUG_BAT_UNUSED #ifdef DEBUG_BAT_UNUSED
printf("BAT: descriptor %02x: ", d->getTag()); printf("BAT: descriptor %02x: ", d->getTag());
uint8_t len = 2+d->getLength(); uint8_t len = 2+d->getLength();
uint8_t buf[len]; uint8_t *buf = new uint8_t[len];
if(buf){
d->writeToBuffer(buf); d->writeToBuffer(buf);
for(uint8_t i = 0; i < len; i++) for(uint8_t i = 0; i < len; i++)
printf("%02x ", buf[i]); printf("%02x ", buf[i]);
printf("\n"); printf("\n");
delete []buf;
}
#endif #endif
} }
break; break;
@@ -244,11 +247,14 @@ bool CBat::Parse()
#ifdef DEBUG_BAT_UNUSED #ifdef DEBUG_BAT_UNUSED
printf("BAT: descriptor %02x: ", d->getTag()); printf("BAT: descriptor %02x: ", d->getTag());
uint8_t len = 2+d->getLength(); uint8_t len = 2+d->getLength();
uint8_t buf[len]; uint8_t *buf = new uint8_t[len];
if(buf){
d->writeToBuffer(buf); d->writeToBuffer(buf);
for(uint8_t i = 0; i < len; i++) for(uint8_t i = 0; i < len; i++)
printf("%02x ", buf[i]); printf("%02x ", buf[i]);
printf("\n"); printf("\n");
delete []buf;
}
#endif #endif
} }
break; break;
@@ -256,10 +262,13 @@ bool CBat::Parse()
switch(pdsd) { switch(pdsd) {
case 0x00000010: case 0x00000010:
if(d->getTag() == 0x82) { if(d->getTag() == 0x82) {
uint8_t buf[2 + d->getLength()]; uint8_t *buf = new uint8_t[2 + d->getLength()];
if(buf){
d->writeToBuffer(buf); d->writeToBuffer(buf);
LogicalChannelDescriptor ld(buf); LogicalChannelDescriptor ld(buf);
ParseLogicalChannels(&ld, b); ParseLogicalChannels(&ld, b);
delete []buf;
}
} }
break; break;
default: default:

View File

@@ -145,7 +145,9 @@ bool CPmt::ParseEsInfo(ElementaryStreamInfo *esinfo, CZapitChannel * const chann
{ {
RegistrationDescriptor *sd = (RegistrationDescriptor*) d; RegistrationDescriptor *sd = (RegistrationDescriptor*) d;
switch (sd->getFormatIdentifier()) { switch (sd->getFormatIdentifier()) {
case 0x44545331 ... 0x44545333: case 0x44545331:
case 0x44545332:
case 0x44545333:
audio_type = CZapitAudioChannel::DTS; audio_type = CZapitAudioChannel::DTS;
break; break;
case 0x41432d33: case 0x41432d33:
@@ -228,10 +230,13 @@ bool CPmt::ParseEsInfo(ElementaryStreamInfo *esinfo, CZapitChannel * const chann
break; break;
case 0xC5: /* User Private descriptor - Canal+ Radio */ case 0xC5: /* User Private descriptor - Canal+ Radio */
if(d->getLength() >= 25) { if(d->getLength() >= 25) {
uint8_t buf[2 + d->getLength()]; uint8_t *buf = new uint8_t[2 + d->getLength()];
if(buf){
d->writeToBuffer(buf); d->writeToBuffer(buf);
int tsidonid = channel->getTransportStreamId() << 16 | channel->getOriginalNetworkId(); int tsidonid = channel->getTransportStreamId() << 16 | channel->getOriginalNetworkId();
description = convertDVBUTF8((const char*)&buf[3], 24, 2, tsidonid); description = convertDVBUTF8((const char*)&buf[3], 24, 2, tsidonid);
delete []buf;
}
} }
break; break;
case AUDIO_STREAM_DESCRIPTOR: case AUDIO_STREAM_DESCRIPTOR: