From c499792fed77607850174f2627e360c0e6a083e4 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 17 Feb 2020 17:04:59 +0000 Subject: [PATCH] WIP A few compiler warning fixes Remove Thread::postStopCleanup everywhere its not currently needed --- afeed.h | 1 - dvbsubtitles.h | 1 - imagereader.cc | 4 ---- imagereader.h | 1 - input.h | 2 ++ inputcec.h | 2 +- inputlinux.h | 2 +- inputudp.cc | 4 ++-- inputudp.h | 4 ++-- osdopengl.cc | 9 --------- osdopengl.h | 1 - osdopenvg.cc | 8 -------- osdopenvg.h | 1 - osdvector.cc | 5 ----- osdvector.h | 1 - playerliveradio.h | 1 - playerlivetv.h | 1 - tfeed.h | 2 -- thread.h | 2 +- threadp.h | 2 +- timers.h | 2 -- vconnect.h | 1 - vdr.h | 1 - vfeed.h | 1 - vmediaview.cc | 2 -- vscreensaver.h | 1 - vsleeptimer.h | 1 - vvolume.h | 1 - windowsosd.cc | 7 ------- windowsosd.h | 4 +--- 30 files changed, 11 insertions(+), 64 deletions(-) diff --git a/afeed.h b/afeed.h index 69ca133..aafb6e9 100644 --- a/afeed.h +++ b/afeed.h @@ -44,7 +44,6 @@ class AFeed : public Thread_TYPE private: void threadMethod(); - void threadPostStopCleanup() {}; int audioEnabled; bool callbacksend; Callback& cb; diff --git a/dvbsubtitles.h b/dvbsubtitles.h index d268169..c76abef 100644 --- a/dvbsubtitles.h +++ b/dvbsubtitles.h @@ -155,7 +155,6 @@ class DVBSubtitles : public Thread_TYPE void lockOutput(); void unlockOutput(); void threadMethod(); - void threadPostStopCleanup() {}; #ifndef WIN32 pthread_mutex_t input_mutex; pthread_mutex_t output_mutex; diff --git a/imagereader.cc b/imagereader.cc index 752637b..68e8293 100644 --- a/imagereader.cc +++ b/imagereader.cc @@ -215,10 +215,6 @@ void ImageReader::threadMethod() return; } -void ImageReader::threadPostStopCleanup() -{ -} - void ImageReader::call(void *) { threadSignalNoLock(); } diff --git a/imagereader.h b/imagereader.h index 11c7334..ac6d244 100644 --- a/imagereader.h +++ b/imagereader.h @@ -69,7 +69,6 @@ class ImageReader : public Thread_TYPE, public Callback protected: void threadMethod(); - void threadPostStopCleanup(); private: MediaProvider * provider; diff --git a/input.h b/input.h index e7842ef..af1fdbb 100644 --- a/input.h +++ b/input.h @@ -35,6 +35,8 @@ typedef std::map RemoteTranslationList; class Input: public AbstractOption { public: + virtual ~Input() {} + virtual bool start() { return false; } virtual void stop() {} diff --git a/inputcec.h b/inputcec.h index 11f9973..96b7f36 100644 --- a/inputcec.h +++ b/inputcec.h @@ -45,7 +45,7 @@ class InputCEC : public Input const char* getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey); private: - constexpr static char* myModName = "InputCEC"; + static constexpr const char* myModName = "InputCEC"; const char* modName() { return myModName; } void InitKeymap(); void InitHWCListwithDefaults(); diff --git a/inputlinux.h b/inputlinux.h index fd69f0c..5bafaa9 100644 --- a/inputlinux.h +++ b/inputlinux.h @@ -42,7 +42,7 @@ class InputLinux : public Input void stop(); private: - constexpr static char* myModName = "InputLinux"; + static constexpr const char* myModName = "InputLinux"; const char* modName() { return myModName; } int initted{}; diff --git a/inputudp.cc b/inputudp.cc index 9e29906..a052a35 100644 --- a/inputudp.cc +++ b/inputudp.cc @@ -129,12 +129,12 @@ void InputUDP::processRequest(const void* data, UINT length) sendInputKey(command); } -const char* InputUDP::getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey) +const char* InputUDP::getHardCodedHardwareKeyNamesForVompKey(UCHAR /* vompKey */) { return ""; } -std::string InputUDP::getHardwareKeyName(int hardwareKey) +std::string InputUDP::getHardwareKeyName(int /* hardwareKey */) { std::string retval; return retval; diff --git a/inputudp.h b/inputudp.h index 1b61d1a..3b18057 100644 --- a/inputudp.h +++ b/inputudp.h @@ -41,12 +41,12 @@ class InputUDP : public Input // InputUDP doesn't do any translation stuff so just keep everything happy here void InitHWCListwithDefaults() {}; - UCHAR TranslateHWCFixed(int code) { return code; }; + UCHAR TranslateHWCFixed(int code) { return static_cast(code); }; const char* getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey); std::string getHardwareKeyName(int hardwareKey); private: - constexpr static char* myModName = "InputUDP"; + static constexpr const char* myModName = "InputUDP"; const char* modName() { return myModName; } bool initted{}; diff --git a/osdopengl.cc b/osdopengl.cc index 8e22988..7cd1fcd 100644 --- a/osdopengl.cc +++ b/osdopengl.cc @@ -344,15 +344,6 @@ void OsdOpenGL::threadMethod() //eglMakeCurrent(egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); } - -void OsdOpenGL::threadPostStopCleanup() -{ - //Doing nothing - //goo; -} - - - void OsdOpenGL::InternalRendering(){ BeginPainting(); diff --git a/osdopengl.h b/osdopengl.h index aa078df..61ca7ee 100644 --- a/osdopengl.h +++ b/osdopengl.h @@ -107,7 +107,6 @@ private: void threadMethod(); - void threadPostStopCleanup(); // This indicates, that currently a video is played, thus the osd updates are driven by the Videosystem bool external_driving; diff --git a/osdopenvg.cc b/osdopenvg.cc index 50abceb..7e68201 100644 --- a/osdopenvg.cc +++ b/osdopenvg.cc @@ -606,14 +606,6 @@ void OsdOpenVG::threadMethod() eglMakeCurrent(egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); } - -void OsdOpenVG::threadPostStopCleanup() -{ - //Doing nothing - //goo; - Log::getInstance()->log("OSD", Log::NOTICE, "Exiting drawing thread"); -} - void OsdOpenVG::InternalRendering(){ vgmutex.Lock(); Colour bg=DrawStyle::WALLPAPER; diff --git a/osdopenvg.h b/osdopenvg.h index a0b0cc7..4a293ab 100644 --- a/osdopenvg.h +++ b/osdopenvg.h @@ -165,7 +165,6 @@ protected: void threadMethod(); - void threadPostStopCleanup(); /* BCM specific */ diff --git a/osdvector.cc b/osdvector.cc index 0ee1c5f..a0b44b6 100644 --- a/osdvector.cc +++ b/osdvector.cc @@ -846,11 +846,6 @@ void OsdVector::PictureReader::threadMethod() } } -void OsdVector::PictureReader::threadPostStopCleanup() -{ - -} - void OsdVector::PictureReader::invalidateLoadIndex(LoadIndex index) { pict_lock_incoming.Lock(); diff --git a/osdvector.h b/osdvector.h index 3f2a8bb..411203e 100644 --- a/osdvector.h +++ b/osdvector.h @@ -324,7 +324,6 @@ class OsdVector : public Osd protected: void threadMethod(); - void threadPostStopCleanup(); Mutex pict_lock_incoming; //locks Mutex decoders_lock; diff --git a/playerliveradio.h b/playerliveradio.h index f0e36f8..2b7f67c 100644 --- a/playerliveradio.h +++ b/playerliveradio.h @@ -85,7 +85,6 @@ class PlayerLiveRadio : public PlayerLive, public Thread_TYPE, public Callback, protected: void threadMethod(); - void threadPostStopCleanup() {}; private: MessageQueue* messageQueue; diff --git a/playerlivetv.h b/playerlivetv.h index 98e4e34..028119d 100644 --- a/playerlivetv.h +++ b/playerlivetv.h @@ -98,7 +98,6 @@ class PlayerLiveTV : public PlayerLive, public Thread_TYPE, public Callback, pub protected: void threadMethod(); - void threadPostStopCleanup() {}; private: bool subtitlesShowing; diff --git a/tfeed.h b/tfeed.h index a4fbe61..255ce17 100644 --- a/tfeed.h +++ b/tfeed.h @@ -43,8 +43,6 @@ public: private: void threadMethod(); - void threadPostStopCleanup() { - }; int teletextEnabled; Callback& cb; }; diff --git a/thread.h b/thread.h index b8a1b91..ebe70f5 100644 --- a/thread.h +++ b/thread.h @@ -28,7 +28,7 @@ class Thread protected: // Override this method in classes derived from ThreadP or ThreadWin virtual void threadMethod()=0; - virtual void threadPostStopCleanup()=0; + virtual void threadPostStopCleanup() {}; // Methods to use from outside the thread virtual int threadStart()=0; // start the thread. threadMethod() will be called in derived class diff --git a/threadp.h b/threadp.h index 0fc2d34..db68e5c 100644 --- a/threadp.h +++ b/threadp.h @@ -32,7 +32,7 @@ class ThreadP : public Thread protected: // Override this method in derived classes virtual void threadMethod()=0; - virtual void threadPostStopCleanup()=0; + virtual void threadPostStopCleanup() {}; // Methods to use from outside the thread int threadStart(); // start the thread. threadMethod() will be called in derived class diff --git a/timers.h b/timers.h index 3cbd1d3..d15ef30 100644 --- a/timers.h +++ b/timers.h @@ -120,7 +120,6 @@ class TimerEvent : public Thread_TYPE virtual void run(); virtual void threadMethod(); - virtual void threadPostStopCleanup() {}; TimerReceiver* client; int clientReference; @@ -149,7 +148,6 @@ class Timers : public Thread_TYPE // Thread stuff virtual void threadMethod(); - virtual void threadPostStopCleanup() {}; void timerEventFinished(TimerEvent* timerEvent); // internal use only, does not return diff --git a/vconnect.h b/vconnect.h index 8773a5a..ea57612 100644 --- a/vconnect.h +++ b/vconnect.h @@ -51,7 +51,6 @@ class VConnect : public VInfo, public Thread_TYPE private: void threadMethod(); - void threadPostStopCleanup() {}; void clearServerIPs(); BoxStack* boxstack; diff --git a/vdr.h b/vdr.h index 6506f75..a30b24d 100644 --- a/vdr.h +++ b/vdr.h @@ -265,7 +265,6 @@ public ExternLogger // Thread void threadMethod(); - void threadPostStopCleanup() {}; // EventDispatcher virtual bool ed_cb_find(EDReceiver* edr, void* userTag); diff --git a/vfeed.h b/vfeed.h index 9ca213a..18acf38 100644 --- a/vfeed.h +++ b/vfeed.h @@ -50,7 +50,6 @@ class VFeed : public Thread_TYPE private: void threadMethod(); - void threadPostStopCleanup() {}; Callback& cb; bool waitForSignal; }; diff --git a/vmediaview.cc b/vmediaview.cc index ff18d40..e66b072 100644 --- a/vmediaview.cc +++ b/vmediaview.cc @@ -226,8 +226,6 @@ class DrawingThread : public Thread_TYPE { } Log::getInstance()->log("DrawingThread",Log::DEBUG,"finishing interrupt=%d",(int)_interrupted); } - virtual void threadPostStopCleanup() {} - }; diff --git a/vscreensaver.h b/vscreensaver.h index 684755e..bbd0286 100644 --- a/vscreensaver.h +++ b/vscreensaver.h @@ -42,7 +42,6 @@ class VScreensaver : public Boxx, public Thread_TYPE private: virtual void threadMethod(); - virtual void threadPostStopCleanup() {}; int screenHeight; int screenWidth; diff --git a/vsleeptimer.h b/vsleeptimer.h index 4a87beb..3ca76f0 100644 --- a/vsleeptimer.h +++ b/vsleeptimer.h @@ -36,7 +36,6 @@ class Sleeptimer : public Thread_TYPE const char* SetTime(); void shutdown(); virtual void threadMethod(); - virtual void threadPostStopCleanup() {}; private: int sec{-1}; diff --git a/vvolume.h b/vvolume.h index dbe4d49..a1a670b 100644 --- a/vvolume.h +++ b/vvolume.h @@ -36,7 +36,6 @@ class VVolume : public Boxx, public TimerReceiver void timercall(int clientReference); private: - int displayCommand; int displayVolume; }; diff --git a/windowsosd.cc b/windowsosd.cc index 199286d..780b185 100644 --- a/windowsosd.cc +++ b/windowsosd.cc @@ -264,13 +264,6 @@ void WindowsOsd::threadMethod() } } - -void WindowsOsd::threadPostStopCleanup() -{ - //Doing nothing - //goo; -} - void WindowsOsd::setExternalDriving(DsAllocator* dsall, DWORD width, DWORD height) { if (swappy) diff --git a/windowsosd.h b/windowsosd.h index ec93f7c..fa1c723 100644 --- a/windowsosd.h +++ b/windowsosd.h @@ -73,8 +73,6 @@ public: virtual int isInitialized()=0; void threadMethod(); - void threadPostStopCleanup(); - enum EVR_state { EVR_pres_off = 0, @@ -138,4 +136,4 @@ protected: -#endif \ No newline at end of file +#endif -- 2.39.2