From e05b1f5b85479a6700f5f30db02bab618cc4b125 Mon Sep 17 00:00:00 2001 From: max10 Date: Thu, 4 Dec 2014 15:25:12 +0100 Subject: [PATCH] fix compiler warning --- common/ca_ci.cpp | 22 +++++++++++----------- common/ca_ci.h | 2 +- libeplayer3/input.cpp | 4 +++- libspark/playback_libeplayer3.cpp | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/common/ca_ci.cpp b/common/ca_ci.cpp index aa102c9..694e09d 100644 --- a/common/ca_ci.cpp +++ b/common/ca_ci.cpp @@ -245,7 +245,7 @@ bool sendCreateTC(tSlot* slot) return true; } -void cCA::process_tpdu(tSlot* slot, unsigned char tpdu_tag, __u8* data, int asn_data_length, int con_id) +void cCA::process_tpdu(tSlot* slot, unsigned char tpdu_tag, __u8* data, int asn_data_length, int /*con_id*/) { switch (tpdu_tag) { @@ -532,7 +532,7 @@ int cCA::GetCAIDS(CaIdVector &Caids) { if ((*it)->camIsReady) { - for (int i = 0; i < (*it)->cam_caids.size(); i++) + for (unsigned int i = 0; i < (*it)->cam_caids.size(); i++) Caids.push_back((*it)->cam_caids[i]); } } @@ -559,7 +559,7 @@ SlotIt cCA::FindFreeSlot(ca_map_t camap, unsigned char scrambled) printf("%s:%s\n", FILENAME, __func__); std::list::iterator it; ca_map_iterator_t caIt; - int i; + unsigned int i; for (it = slot_data.begin(); it != slot_data.end(); ++it) { if ((*it)->camIsReady && (*it)->hasCAManager && (*it)->hasAppManager && !(*it)->inUse) @@ -593,7 +593,7 @@ SlotIt cCA::FindFreeSlot(ca_map_t camap, unsigned char scrambled) } /* erstmal den capmt wie er von Neutrino kommt in den Slot puffern */ -bool cCA::SendCAPMT(u64 tpid, u8 source_demux, u8 camask, const unsigned char * cabuf, u32 calen, const unsigned char * rawpmt, u32 rawlen, unsigned char scrambled, ca_map_t cm, int mode, bool enabled) +bool cCA::SendCAPMT(u64 tpid, u8 source_demux, u8 camask, const unsigned char * cabuf, u32 calen, const unsigned char * /*rawpmt*/, u32 /*rawlen*/, unsigned char scrambled, ca_map_t cm, int mode, bool enabled) { printf("%s:%s\n", FILENAME, __func__); if (!num_slots) return true; /* stb's without ci-slots */ @@ -626,7 +626,7 @@ bool cCA::SendCAPMT(u64 tpid, u8 source_demux, u8 camask, const unsigned char * (*It)->tpid = tpid; (*It)->source = source_demux; (*It)->pmtlen = calen; - for(int i = 0; i < calen; i++) + for (unsigned int i = 0; i < calen; i++) (*It)->pmtdata[i] = cabuf[i]; (*It)->newCapmt = true; } @@ -642,7 +642,7 @@ bool cCA::SendCAPMT(u64 tpid, u8 source_demux, u8 camask, const unsigned char * if (!cm.empty()) { printf("Service Caids: "); - for(ca_map_iterator_t it = cm.begin(); it != cm.end(); ++it) + for (ca_map_iterator_t it = cm.begin(); it != cm.end(); ++it) { printf("%04x ", (*it)); } @@ -702,7 +702,7 @@ cCA::cCA(int Slots) slot_data.push_back(slot); /* now reset the slot so the poll pri can happen in the thread */ if (ioctl(fd, CA_RESET, i) < 0) - printf("IOCTL CA_RESET failed for slot %d\n", slot); + printf("IOCTL CA_RESET failed for slot %p\n", slot); /* create a thread for each slot */ if (fd > 0) { @@ -744,9 +744,9 @@ void cCA::setSource(tSlot* slot) snprintf(buf, 64, "/proc/stb/tsmux/ci%d_input", slot->slot); FILE *ci = fopen(buf, "wb"); - if(ci > 0) + if (ci > (void*)0) { - switch(slot->source) + switch (slot->source) { case TUNER_A: fprintf(ci, "A"); @@ -1005,7 +1005,7 @@ void cCA::slot_pollthread(void *c) slot->cam_caids = slot->camgrSession->getCAIDs(); printf("Anzahl Caids: %d Slot: %d > ", slot->cam_caids.size(), slot->slot); - for (int i = 0; i < slot->cam_caids.size(); i++) + for (unsigned int i = 0; i < slot->cam_caids.size(); i++) { printf("%04x ", slot->cam_caids[i]); @@ -1046,7 +1046,7 @@ bool cCA::SendCaPMT(tSlot* slot) { #if x_debug printf("buffered capmt(0x%X): > \n", slot->pmtlen); - for(int i = 0; i < slot->pmtlen; i++) + for (unsigned int i = 0; i < slot->pmtlen; i++) printf("%02X ", slot->pmtdata[i]); printf("\n"); #endif diff --git a/common/ca_ci.h b/common/ca_ci.h index 0b6fb57..fd8b7ba 100644 --- a/common/ca_ci.h +++ b/common/ca_ci.h @@ -160,7 +160,7 @@ class eDVBCICAManagerSession; typedef struct { pthread_t slot_thread; - int slot; + unsigned int slot; int fd; int connection_id; eStatus status; diff --git a/libeplayer3/input.cpp b/libeplayer3/input.cpp index 56f474a..b30b786 100644 --- a/libeplayer3/input.cpp +++ b/libeplayer3/input.cpp @@ -394,7 +394,9 @@ bool Input::Init(const char *filename) subtitleTrack = NULL; teletextTrack = NULL; +#if 0 again: +#endif avfc = avformat_alloc_context(); avfc->interrupt_callback.callback = interrupt_cb; avfc->interrupt_callback.opaque = (void *) player; @@ -418,7 +420,7 @@ again: avfc->probesize = 131072; } - for (int i = 0; i < avfc->nb_streams; i++) { + for (unsigned int i = 0; i < avfc->nb_streams; i++) { if (avfc->streams[i]->codec->codec_id == AV_CODEC_ID_AAC) find_info = false; } diff --git a/libspark/playback_libeplayer3.cpp b/libspark/playback_libeplayer3.cpp index b095ca1..23aaef3 100644 --- a/libspark/playback_libeplayer3.cpp +++ b/libspark/playback_libeplayer3.cpp @@ -338,7 +338,7 @@ void cPlayback::FindAllSubs(uint16_t * /*pids*/, unsigned short * /*supp*/, uint *num = 0; } -bool cPlayback::SelectSubtitles(int pid) +bool cPlayback::SelectSubtitles(int /*pid*/) { return false; }