From e90b8651e698553a492e7476d72407786ca8e9fd Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 16 Aug 2015 01:38:03 +0300 Subject: [PATCH] Silenced some cppcheck warnings. --- device.c | 2 +- device.h | 2 +- deviceif.h | 2 +- discoverif.h | 2 +- msearch.h | 2 +- pollerif.h | 2 +- rtcp.c | 2 +- rtcp.h | 2 +- rtp.h | 2 +- rtsp.h | 2 +- setup.c | 4 ++-- tunerif.h | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/device.c b/device.c index 31ed352..73626d6 100644 --- a/device.c +++ b/device.c @@ -350,7 +350,7 @@ bool cSatipDevice::SetChannelDevice(const cChannel *channelP, bool liveViewP) bool cSatipDevice::SetPid(cPidHandle *handleP, int typeP, bool onP) { - debug12("%s (%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, handleP->pid, typeP, onP, deviceIndexM); + debug12("%s (%d, %d, %d) [device %u]", __PRETTY_FUNCTION__, handleP ? handleP->pid : -1, typeP, onP, deviceIndexM); if (pTunerM && handleP && handleP->pid >= 0) { if (onP) return pTunerM->SetPid(handleP->pid, typeP, true); diff --git a/device.h b/device.h index a86029e..ad18e2f 100644 --- a/device.h +++ b/device.h @@ -43,7 +43,7 @@ private: // constructor & destructor public: - cSatipDevice(unsigned int deviceIndexP); + explicit cSatipDevice(unsigned int deviceIndexP); virtual ~cSatipDevice(); cString GetInformation(unsigned int pageP = SATIP_DEVICE_INFO_ALL); diff --git a/deviceif.h b/deviceif.h index a6f7c8a..b67bfe1 100644 --- a/deviceif.h +++ b/deviceif.h @@ -19,7 +19,7 @@ public: virtual bool IsIdle(void) = 0; private: - cSatipDeviceIf(const cSatipDeviceIf&); + explicit cSatipDeviceIf(const cSatipDeviceIf&); cSatipDeviceIf& operator=(const cSatipDeviceIf&); }; diff --git a/discoverif.h b/discoverif.h index b6218c5..3782b42 100644 --- a/discoverif.h +++ b/discoverif.h @@ -15,7 +15,7 @@ public: virtual void SetUrl(const char *urlP) = 0; private: - cSatipDiscoverIf(const cSatipDiscoverIf&); + explicit cSatipDiscoverIf(const cSatipDiscoverIf&); cSatipDiscoverIf& operator=(const cSatipDiscoverIf&); }; diff --git a/msearch.h b/msearch.h index b27a008..db00c86 100644 --- a/msearch.h +++ b/msearch.h @@ -26,7 +26,7 @@ private: bool registeredM; public: - cSatipMsearch(cSatipDiscoverIf &discoverP); + explicit cSatipMsearch(cSatipDiscoverIf &discoverP); virtual ~cSatipMsearch(); void Probe(void); diff --git a/pollerif.h b/pollerif.h index 79d4a96..3447871 100644 --- a/pollerif.h +++ b/pollerif.h @@ -17,7 +17,7 @@ public: virtual cString ToString(void) const = 0; private: - cSatipPollerIf(const cSatipPollerIf&); + explicit cSatipPollerIf(const cSatipPollerIf&); cSatipPollerIf& operator=(const cSatipPollerIf&); }; diff --git a/rtcp.c b/rtcp.c index f88c805..c815287 100644 --- a/rtcp.c +++ b/rtcp.c @@ -36,7 +36,7 @@ int cSatipRtcp::GetFd(void) int cSatipRtcp::GetApplicationOffset(int *lengthP) { - debug16("%s (%d) [device %d]", __PRETTY_FUNCTION__, *lengthP, tunerM.GetId()); + debug16("%s (%d) [device %d]", __PRETTY_FUNCTION__, lengthP ? *lengthP : -1, tunerM.GetId()); if (!lengthP) return -1; int offset = 0; diff --git a/rtcp.h b/rtcp.h index 9b31241..59fb176 100644 --- a/rtcp.h +++ b/rtcp.h @@ -23,7 +23,7 @@ private: int GetApplicationOffset(int *lengthP); public: - cSatipRtcp(cSatipTunerIf &tunerP); + explicit cSatipRtcp(cSatipTunerIf &tunerP); virtual ~cSatipRtcp(); // for internal poller interface diff --git a/rtp.h b/rtp.h index 5080e37..104a49c 100644 --- a/rtp.h +++ b/rtp.h @@ -28,7 +28,7 @@ private: int GetHeaderLength(unsigned char *bufferP, unsigned int lengthP); public: - cSatipRtp(cSatipTunerIf &tunerP); + explicit cSatipRtp(cSatipTunerIf &tunerP); virtual ~cSatipRtp(); virtual void Close(void); diff --git a/rtsp.h b/rtsp.h index 3949524..1897ac6 100644 --- a/rtsp.h +++ b/rtsp.h @@ -50,7 +50,7 @@ private: cSatipRtsp& operator=(const cSatipRtsp&); public: - cSatipRtsp(cSatipTunerIf &tunerP); + explicit cSatipRtsp(cSatipTunerIf &tunerP); virtual ~cSatipRtsp(); cString RtspUnescapeString(const char *strP); diff --git a/setup.c b/setup.c index e3eeeab..479ea97 100644 --- a/setup.c +++ b/setup.c @@ -94,7 +94,7 @@ private: void Setup(void); public: - cSatipServerInfo(cSatipServer *serverP); + explicit cSatipServerInfo(cSatipServer *serverP); virtual ~cSatipServerInfo(); virtual eOSState ProcessKey(eKeys keyP); }; @@ -145,7 +145,7 @@ private: cSatipServer *serverM; public: - cSatipServerItem(cSatipServer *serverP); + explicit cSatipServerItem(cSatipServer *serverP); cSatipServer *Server(void) { return serverM; } virtual void SetMenuItem(cSkinDisplayMenu *displayMenuP, int indexP, bool currentP, bool selectableP); }; diff --git a/tunerif.h b/tunerif.h index 3790bcd..f5ea6a6 100644 --- a/tunerif.h +++ b/tunerif.h @@ -19,7 +19,7 @@ public: virtual int GetId(void) = 0; private: - cSatipTunerIf(const cSatipTunerIf&); + explicit cSatipTunerIf(const cSatipTunerIf&); cSatipTunerIf& operator=(const cSatipTunerIf&); };