[vdr] [PATCH] PLUGINS/src/dvbsddevice/dvbsdffosd.c: remove superflous variable `Bitmap`

Paul Menzel paulepanter at users.sourceforge.net
Sun Apr 3 23:06:21 CEST 2011


Date: Fri, 4 Feb 2011 14:58:23 +0100

Cppcheck reports the following.

	cppcheck: (style) Variable 'Bitmap' is assigned a value that is never used

Therefore remove the variable `Bitmap` for stylistic reasons since the compiler probably optimized that out anyway.

Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
CC: Klaus Schmidinger <Klaus.Schmidinger at tvdr.de>
---
 PLUGINS/src/dvbsddevice/dvbsdffosd.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/PLUGINS/src/dvbsddevice/dvbsdffosd.c b/PLUGINS/src/dvbsddevice/dvbsdffosd.c
index 4b60ef5..8be1d25 100644
--- a/PLUGINS/src/dvbsddevice/dvbsdffosd.c
+++ b/PLUGINS/src/dvbsddevice/dvbsdffosd.c
@@ -73,8 +73,7 @@ void cDvbSdFfOsd::SetActive(bool On)
            Flush();
         }
      else if (shown) {
-        cBitmap *Bitmap;
-        for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) {
+        for (int i = 0; GetBitmap(i) != NULL; i++) {
             Cmd(OSD_SetWindow, 0, i + 1);
             Cmd(OSD_Close);
             }
@@ -108,8 +107,7 @@ eOsdError cDvbSdFfOsd::CanHandleAreas(const tArea *Areas, int NumAreas)
 eOsdError cDvbSdFfOsd::SetAreas(const tArea *Areas, int NumAreas)
 {
   if (shown) {
-     cBitmap *Bitmap;
-     for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) {
+     for (int i = 0; GetBitmap(i) != NULL; i++) {
          Cmd(OSD_SetWindow, 0, i + 1);
          Cmd(OSD_Close);
          }
-- 
1.7.4.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.linuxtv.org/pipermail/vdr/attachments/20110403/92ffd2f9/attachment.pgp>


More information about the vdr mailing list