diff --git a/src/driver/file.h b/src/driver/file.h index 6d62e8e46..49cdaa04d 100644 --- a/src/driver/file.h +++ b/src/driver/file.h @@ -33,12 +33,16 @@ #ifndef __FILE_H__ #define __FILE_H__ +#include +#if 0 +/* this is already done by AC_SYS_LARGEFILE */ #include /* make sure off_t has size 8 in __USE_FILE_OFFSET64 mode */ #ifndef __USE_FILE_OFFSET64 #error not using 64 bit file offsets #endif /* __USE_FILE__OFFSET64 */ +#endif #include diff --git a/src/driver/radiotools.h b/src/driver/radiotools.h index 24bf05c30..c13d7d3aa 100644 --- a/src/driver/radiotools.h +++ b/src/driver/radiotools.h @@ -24,13 +24,12 @@ #ifndef __RADIO_TOOLS_H #define __RADIO_TOOLS_H +#include unsigned short crc16_ccitt(unsigned char *daten, int len, bool skipfirst); char *rtrim(char *text); -typedef long long unsigned int uint64_t; - class cTimeMs { private: uint64_t begin; diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index ca03ad5b1..bbc86c756 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -839,17 +839,17 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 break; case NeutrinoMessages::EVT_POPUP : *msg = NeutrinoMessages::EVT_POPUP; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; case NeutrinoMessages::EVT_EXTMSG : *msg = NeutrinoMessages::EVT_EXTMSG; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; case NeutrinoMessages::CHANGEMODE : // Change *msg = NeutrinoMessages::CHANGEMODE; - *data = *(unsigned*) p; + *data = *(unsigned long*) p; break; case NeutrinoMessages::STANDBY_TOGGLE : *msg = NeutrinoMessages::STANDBY_TOGGLE; @@ -865,7 +865,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 break; case NeutrinoMessages::EVT_START_PLUGIN : *msg = NeutrinoMessages::EVT_START_PLUGIN; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; case NeutrinoMessages::LOCK_RC : @@ -1107,7 +1107,7 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); { case CTimerdClient::EVT_ANNOUNCE_RECORD : *msg = NeutrinoMessages::ANNOUNCE_RECORD; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; case CTimerdClient::EVT_ANNOUNCE_ZAPTO : @@ -1128,17 +1128,17 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); break; case CTimerdClient::EVT_RECORD_START : *msg = NeutrinoMessages::RECORD_START; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; case CTimerdClient::EVT_RECORD_STOP : *msg = NeutrinoMessages::RECORD_STOP; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; case CTimerdClient::EVT_ZAPTO : *msg = NeutrinoMessages::ZAPTO; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; case CTimerdClient::EVT_SHUTDOWN : @@ -1155,12 +1155,12 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); break; case CTimerdClient::EVT_REMIND : *msg = NeutrinoMessages::REMIND; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; case CTimerdClient::EVT_EXEC_PLUGIN : *msg = NeutrinoMessages::EVT_START_PLUGIN; - *data = (unsigned) p; + *data = (unsigned long) p; dont_delete_p = true; break; diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index 66e04502b..ac773ba06 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -108,8 +108,8 @@ */ -typedef uint32_t neutrino_msg_t; -typedef uint32_t neutrino_msg_data_t; +typedef unsigned long neutrino_msg_t; +typedef unsigned long neutrino_msg_data_t; #define NEUTRINO_UDS_NAME "/tmp/neutrino.sock" diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index c7149a0e4..876c19aa2 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -225,7 +225,7 @@ void streamts_main_thread(void * /*data*/) pfd[tcnt].revents = 0; tcnt++; exit_flag = 0; - pthread_create (&st, NULL, streamts_live_thread, (void *) connfd); + pthread_create (&st, NULL, streamts_live_thread, &connfd); } else { if (pfd[i].revents & (POLLHUP | POLLRDHUP)) { connfd = -1; @@ -259,7 +259,7 @@ void * streamts_live_thread(void *data) int pids[MAXPIDS]; char cbuf[512]; char *bp; - int fd = (int) data; + int fd = *((int *)data); FILE * fp; unsigned char demuxfd_count = 0; @@ -370,7 +370,7 @@ void streamts_file_thread(void *data) int tsfilelen = 0; int fileslice = 0; int i = 0; - int fd = (int) data; + int fd = *((int *)data); buf = (unsigned char *) malloc(IN_SIZE); diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 8e034fe13..203a33026 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -254,8 +254,8 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) int res = -1; uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); - uint32_t msg; - uint32_t data; + neutrino_msg_t msg; + neutrino_msg_data_t data; bool loop=true; bool update=true; diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index bb01a65a4..369d9fc9f 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1351,8 +1351,8 @@ CZapitChannel* CChannelList::getPrevNextChannel(int key, unsigned int &sl) } sl = cactive; channel = bouquetList->Bouquets[bactive]->channelList->getChannelFromIndex(cactive); - printf("CChannelList::getPrevNextChannel: selected %d total %d active bouquet %d total %d channel %x (%s)\n", - cactive, chanlist.size(), bactive, bsize, (int) channel, channel ? channel->getName().c_str(): ""); + printf("CChannelList::getPrevNextChannel: selected %d total %d active bouquet %d total %d channel %p (%s)\n", + cactive, chanlist.size(), bactive, bsize, channel, channel ? channel->getName().c_str(): ""); } else { if ((key == g_settings.key_quickzap_down) || (key == CRCInput::RC_left)) { if(sl == 0) diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 50bf4775c..b5cd62e2e 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -74,7 +74,7 @@ typedef struct dirent dirent_struct; typedef struct stat stat_struct; #define my_stat stat #define my_lstat lstat -#error not using 64 bit file offsets +//#error not using 64 bit file offsets #endif #define SMSKEY_TIMEOUT 2000 diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp index a455736b3..8fbaf4201 100644 --- a/src/gui/movieinfo.cpp +++ b/src/gui/movieinfo.cpp @@ -682,7 +682,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info) pos2 = -1; ptr = strstr(&text[pos], MI_XML_TAG_PID); if (ptr) - pos2 = (int)ptr - (int)&text[pos]; + pos2 = (int)(ptr - &text[pos]); //pos2 = strcspn(&text[pos],MI_XML_TAG_PID); if (pos2 >= 0) { pos2 += sizeof(MI_XML_TAG_PID); @@ -697,7 +697,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info) pos2 = -1; ptr = strstr(&text[pos], MI_XML_TAG_ATYPE); if (ptr) - pos2 = (int)ptr - (int)&text[pos]; + pos2 = (int)(ptr - &text[pos]); //pos2 = strcspn(&text[pos],MI_XML_TAG_ATYPE); if (pos2 >= 0) { pos2 += sizeof(MI_XML_TAG_ATYPE); @@ -711,7 +711,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info) pos2 = -1; ptr = strstr(&text[pos], MI_XML_TAG_SELECTED); if (ptr) - pos2 = (int)ptr - (int)&text[pos]; + pos2 = (int)(ptr - &text[pos]); //pos2 = strcspn(&text[pos],MI_XML_TAG_SELECTED); if (pos2 >= 0) { pos2 += sizeof(MI_XML_TAG_SELECTED); @@ -726,7 +726,7 @@ bool CMovieInfo::parseXmlQuickFix(char *text, MI_MOVIE_INFO * movie_info) pos2 = -1; ptr = strstr(&text[pos], MI_XML_TAG_NAME); if (ptr) - pos2 = (int)ptr - (int)&text[pos]; + pos2 = (int)(ptr - &text[pos]); if (pos2 >= 0) { pos2 += sizeof(MI_XML_TAG_PID); while (text[pos + pos2] != '\"' && text[pos + pos2] != 0 && text[pos + pos2] != '/') diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 88c89efa0..f5decee5e 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -681,7 +681,7 @@ void CMoviePlayerGui::PlayFile(void) } if (playstate == CMoviePlayerGui::STOPPED) { - printf("CMoviePlayerGui::PlayFile: exit, isMovieBrowser %d p_movie_info %x\n", isMovieBrowser, (int) p_movie_info); + printf("CMoviePlayerGui::PlayFile: exit, isMovieBrowser %d p_movie_info %p\n", isMovieBrowser, p_movie_info); playstate = CMoviePlayerGui::STOPPED; handleMovieBrowser((neutrino_msg_t) g_settings.mpkey_stop, position); } @@ -859,7 +859,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int position) } else if (msg == (neutrino_msg_t) g_settings.mpkey_stop) { // if we have a movie information, try to save the stop position - printf("CMoviePlayerGui::handleMovieBrowser: stop, isMovieBrowser %d p_movie_info %x\n", isMovieBrowser, (int) p_movie_info); + printf("CMoviePlayerGui::handleMovieBrowser: stop, isMovieBrowser %d p_movie_info %p\n", isMovieBrowser, p_movie_info); if (isMovieBrowser && p_movie_info) { timeb current_time; ftime(¤t_time); diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index f1e9a0fbd..2a36740f8 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -333,7 +333,10 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) return menu_return::RETURN_REPAINT; } -int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) +/* this is not type "int", because it does not return a code indicating success but + * instead returns altered "msg". This is different ot all other "handleMsg" functions + * and should probably be fixed somewhen... */ +neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) { int w = x + width - xpos2; //printf("CScanTs::handleMsg: x %d xpos2 %d width %d w %d\n", x, xpos2, width, w); diff --git a/src/gui/scan.h b/src/gui/scan.h index db871bcc0..e02217133 100644 --- a/src/gui/scan.h +++ b/src/gui/scan.h @@ -73,7 +73,7 @@ class CScanTs : public CMenuTarget void paintLineLocale(int x, int * y, int width, const neutrino_locale_t l); void paintLine(int x, int y, int width, const char * const txt); void paintRadar(void); - int handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data); + neutrino_msg_t handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data); int greater_xpos(int xpos, const neutrino_locale_t txt); bool freqready; void showSNR(); diff --git a/src/zapit/src/capmt.cpp b/src/zapit/src/capmt.cpp index 301345ac5..fa64dca1e 100644 --- a/src/zapit/src/capmt.cpp +++ b/src/zapit/src/capmt.cpp @@ -81,7 +81,7 @@ bool CCam::makeCaPmt(CZapitChannel * channel, uint8_t list, const CaIdVector &ca int len; unsigned char * buffer = channel->getRawPmt(len); - INFO("cam %x source %d camask %d list %02x buffer", (int) this, source_demux, camask, list); + INFO("cam %p source %d camask %d list %02x buffer", this, source_demux, camask, list); if(!buffer) return false; diff --git a/src/zapit/src/scan.cpp b/src/zapit/src/scan.cpp index 22e5c5287..b7143a7e4 100644 --- a/src/zapit/src/scan.cpp +++ b/src/zapit/src/scan.cpp @@ -530,7 +530,7 @@ void CServiceScan::SaveServices() bool CServiceScan::ScanProviders() { - flags = (int) scan_arg; + flags = *((int *)scan_arg); scanBouquetManager = new CBouquetManager(); printf("[scan] NIT %s, fta only: %s, satellites %s\n", flags & SCAN_NIT ? "yes" : "no", diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index f0181d9f7..ec6b78a26 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -743,7 +743,7 @@ bool CZapit::StartScan(int scan_mode) { PrepareScan(); - CServiceScan::getInstance()->Start(CServiceScan::SCAN_PROVIDER, (void *) scan_mode); + CServiceScan::getInstance()->Start(CServiceScan::SCAN_PROVIDER, &scan_mode); return true; }