diff --git a/lib/libcoolstream/cnxtfb.h b/lib/libcoolstream/cnxtfb.h index 15a47afc1..b8f1b8149 100644 --- a/lib/libcoolstream/cnxtfb.h +++ b/lib/libcoolstream/cnxtfb.h @@ -39,7 +39,7 @@ typedef enum { CNXTFB_BLEND_MODE_GLOBAL_ALPHA = 0, /* Global / Region Alpha */ CNXTFB_BLEND_MODE_PIXEL_ALPHA, /* Alpha from pixel */ - CNXTFB_BLEND_MODE_ALPHA_MULTIPLIED, /* Global alpha multiplied with pixel alpha */ + CNXTFB_BLEND_MODE_ALPHA_MULTIPLIED /* Global alpha multiplied with pixel alpha */ } CNXTFB_BLEND_MODE; #define CNXTFB_IO(type) _IO('F', type) diff --git a/lib/libcoolstream/cs_frontpanel.h b/lib/libcoolstream/cs_frontpanel.h index 97c0f577a..e85c9f0e8 100644 --- a/lib/libcoolstream/cs_frontpanel.h +++ b/lib/libcoolstream/cs_frontpanel.h @@ -61,7 +61,7 @@ typedef enum { FP_FLAG_SCROLL_DELAY = 0x08, /* delayed scroll start */ FP_FLAG_ALIGN_LEFT = 0x10, /* align the text in display from the left (default) */ FP_FLAG_ALIGN_RIGHT = 0x20, /* align the text in display from the right (arabic) */ - FP_FLAG_UPDATE_SCROLL_POS = 0x40, /* update the current position for scrolling */ + FP_FLAG_UPDATE_SCROLL_POS = 0x40 /* update the current position for scrolling */ } fp_flag; typedef struct { @@ -79,7 +79,7 @@ typedef enum { FP_LED_3_ON = 0x83, FP_LED_1_OFF = 0x01, FP_LED_2_OFF = 0x02, - FP_LED_3_OFF = 0x03, + FP_LED_3_OFF = 0x03 } fp_led_ctrl_t; typedef struct { diff --git a/lib/libcoolstream/cs_vfd.h b/lib/libcoolstream/cs_vfd.h index 4da58296b..377263a85 100755 --- a/lib/libcoolstream/cs_vfd.h +++ b/lib/libcoolstream/cs_vfd.h @@ -60,7 +60,7 @@ typedef enum VFD_FLAG_SCROLL_DELAY = 0x08, /* delayed scroll start */ VFD_FLAG_ALIGN_LEFT = 0x10, /* align the text in display from the left (default) */ VFD_FLAG_ALIGN_RIGHT = 0x20, /* align the text in display from the right (arabic) */ - VFD_FLAG_UPDATE_SCROLL_POS = 0x40, /* update the current position for scrolling */ + VFD_FLAG_UPDATE_SCROLL_POS = 0x40 /* update the current position for scrolling */ } vfd_flag; typedef struct { @@ -78,7 +78,7 @@ typedef enum { VFD_LED_3_ON = 0x83, VFD_LED_1_OFF = 0x01, VFD_LED_2_OFF = 0x02, - VFD_LED_3_OFF = 0x03, + VFD_LED_3_OFF = 0x03 } vfd_led_ctrl_t; typedef struct { diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index ef784b22f..9f8749721 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1549,7 +1549,7 @@ int CRCInput::translate(int code, int /*num*/) if ((code >= 0) && (code <= KEY_MAX)) return code; else - return RC_nokey; + return ( unsigned int)RC_nokey; } void CRCInput::close_click() diff --git a/src/driver/screenshot.h b/src/driver/screenshot.h index e28e1eab2..a4f348a8b 100644 --- a/src/driver/screenshot.h +++ b/src/driver/screenshot.h @@ -30,7 +30,7 @@ class CScreenShot : public OpenThreads::Thread typedef enum { FORMAT_PNG, FORMAT_JPG, - FORMAT_BMP, + FORMAT_BMP } screenshot_format_t; private: diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 6802cb034..5ae161b7a 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -249,13 +249,12 @@ void SMSKeyInput::setTimeout(int timeout) } -//------------------------------------------------------------------------ //------------------------------------------------------------------------ bool comparetolower(const char a, const char b) { return tolower(a) < tolower(b); -}; +} // sort operators bool sortByName (const CFile& a, const CFile& b) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 84d5aa1f6..e55beb61c 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -227,7 +227,7 @@ bool sortDirection = 0; bool compare_to_lower(const char a, const char b) { return tolower(a) < tolower(b); -}; +} // sort operators bool sortByTitle (const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b) @@ -402,7 +402,7 @@ void CMovieBrowser::fileInfoStale(void) m_FilterLines.lineArray[i].clear(); } m_browserListLines.Icon.clear(); -}; +} void CMovieBrowser::init(void) { @@ -3501,7 +3501,7 @@ CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , char * active = Active; returnIntValue = ReturnIntValue; returnInt = ReturnInt; -}; +} CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , std::string& OptionValue, int* ReturnInt ,int ReturnIntValue ) : CMenuItem() { @@ -3514,7 +3514,7 @@ CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , std::s active = Active; returnIntValue = ReturnIntValue; returnInt = ReturnInt; -}; +} int CMenuSelector::exec(CMenuTarget* /*parent*/) { @@ -3529,7 +3529,7 @@ int CMenuSelector::exec(CMenuTarget* /*parent*/) *optionValueString = optionName; } return menu_return::RETURN_EXIT; -}; +} int CMenuSelector::paint(bool selected) { @@ -3629,7 +3629,7 @@ printf("[CDirMenu] (nfs%d) %s == (mb%d) %s (%d)\n",nfs,g_settings.network_nfs_lo } } } -}; +} int CDirMenu::exec(CMenuTarget* parent, const std::string & actionKey) { diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index df8434f67..e25d565d7 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -61,7 +61,7 @@ class CMoviePlayerGui : public CMenuTarget PLAY = 3, PAUSE = 4, FF = 5, - REW = 6, + REW = 6 }; private: diff --git a/src/gui/network_setup.h b/src/gui/network_setup.h index bec83879b..2464f573c 100644 --- a/src/gui/network_setup.h +++ b/src/gui/network_setup.h @@ -100,19 +100,19 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver enum NETWORK_DHCP_MODE { NETWORK_DHCP_OFF = 0, //static - NETWORK_DHCP_ON = 1, + NETWORK_DHCP_ON = 1 }; enum NETWORK_START_MODE { NETWORK_AUTOSTART_OFF = 0, - NETWORK_AUTOSTART_ON = 1, + NETWORK_AUTOSTART_ON = 1 }; enum NETWORK_NTP_MODE { NETWORK_NTP_OFF = 0, - NETWORK_NTP_ON = 1, + NETWORK_NTP_ON = 1 }; enum NETWORK_SETUP_MODE diff --git a/src/gui/update_ext.cpp b/src/gui/update_ext.cpp index cc5920007..99ce39241 100644 --- a/src/gui/update_ext.cpp +++ b/src/gui/update_ext.cpp @@ -242,7 +242,7 @@ bool CExtUpdate::applySettings() // find mtdram device std::string mtdRamFilename = "", mtdBlockFileName = ""; - int mtdRamSize, mtdRamEraseSize, mtdRamNr = 0; + int mtdRamSize = 0, mtdRamEraseSize = 0, mtdRamNr = 0; f1 = fopen("/proc/mtd", "r"); if(!f1) return ErrorReset(RESET_UNLOAD, "cannot read /proc/mtd"); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 0da0a957b..132c57707 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3668,7 +3668,7 @@ void CNeutrinoApp::loadKeys(const char * fname) } //rc-key configuration - g_settings.key_tvradio_mode = tconfig.getInt32( "key_tvradio_mode", CRCInput::RC_nokey ); + g_settings.key_tvradio_mode = tconfig.getInt32( "key_tvradio_mode", (unsigned int)CRCInput::RC_nokey ); g_settings.key_power_off = tconfig.getInt32( "key_power_off", CRCInput::RC_standby ); g_settings.key_channelList_pageup = tconfig.getInt32( "key_channelList_pageup", CRCInput::RC_page_up ); @@ -3678,12 +3678,12 @@ void CNeutrinoApp::loadKeys(const char * fname) g_settings.key_channelList_addrecord = tconfig.getInt32( "key_channelList_addrecord", CRCInput::RC_red ); g_settings.key_channelList_addremind = tconfig.getInt32( "key_channelList_addremind", CRCInput::RC_yellow ); - g_settings.key_list_start = tconfig.getInt32( "key_list_start", CRCInput::RC_nokey ); - g_settings.key_list_end = tconfig.getInt32( "key_list_end", CRCInput::RC_nokey ); + g_settings.key_list_start = tconfig.getInt32( "key_list_start", (unsigned int)CRCInput::RC_nokey ); + g_settings.key_list_end = tconfig.getInt32( "key_list_end", (unsigned int)CRCInput::RC_nokey ); g_settings.key_timeshift = tconfig.getInt32( "key_timeshift", CRCInput::RC_pause ); - g_settings.key_plugin = tconfig.getInt32( "key_plugin", CRCInput::RC_nokey ); + g_settings.key_plugin = tconfig.getInt32( "key_plugin", (unsigned int)CRCInput::RC_nokey ); g_settings.key_unlock = tconfig.getInt32( "key_unlock", CRCInput::RC_setup ); - g_settings.key_screenshot = tconfig.getInt32( "key_screenshot", CRCInput::RC_nokey ); + g_settings.key_screenshot = tconfig.getInt32( "key_screenshot", (unsigned int)CRCInput::RC_nokey ); #ifdef ENABLE_PIP g_settings.key_pip_close = tconfig.getInt32( "key_pip_close", CRCInput::RC_help ); g_settings.key_pip_setup = tconfig.getInt32( "key_pip_setup", CRCInput::RC_pos ); diff --git a/src/system/fsmounter.cpp b/src/system/fsmounter.cpp index 28e35a523..a6bfb93b3 100644 --- a/src/system/fsmounter.cpp +++ b/src/system/fsmounter.cpp @@ -159,16 +159,12 @@ bool CFSMounter::isMounted(const char * const local_dir) std::ifstream in; if (local_dir == NULL) return false; - - // according to the man page realpath() sucks, but there's nothing better :( - int path_max = 0; #ifdef PATH_MAX - path_max = PATH_MAX; + char mount_point[PATH_MAX]; #else - path_max = 4096; + char mount_point[4096]; #endif - char mount_point[path_max]; if (realpath(local_dir, mount_point) == NULL) { printf("[CFSMounter] could not resolve dir: %s: %s\n",local_dir, strerror(errno)); return false; diff --git a/src/zapit/include/zapit/scan.h b/src/zapit/include/zapit/scan.h index 80678f460..938dab62b 100644 --- a/src/zapit/include/zapit/scan.h +++ b/src/zapit/include/zapit/scan.h @@ -55,7 +55,7 @@ class CServiceScan : public OpenThreads::Thread SCAN_TVRADIO = 0x60, SCAN_DATA = 0x80, SCAN_ALL = 0xE0, - SCAN_LOGICAL_HD = 0x100, + SCAN_LOGICAL_HD = 0x100 } scan_flags_t; private: