Compile warning fix for xine-0.7.7 and vdr-1.3.44

Message ID 440812DE.5080803@syphir.sytes.net
State New
Headers

Commit Message

C.Y.M March 3, 2006, 9:56 a.m. UTC
  I noticed some warnings when compiling xine-0.7.7 and vdr-1.3.44.  Here is a patch.

Best Regards,
  

Comments

Darren Salt March 3, 2006, 9:07 p.m. UTC | #1
I demand that C.Y.M may or may not have written...

> I noticed some warnings when compiling xine-0.7.7 and vdr-1.3.44.  Here is
> a patch.

I'm *not* seeing these warnings. Which version of g++, what options? (I'm
using g++ 4.0.3 20060212 (Debian 4.0.2-9); I've tried -Wall -Wextra.)
  
Reinhard Nissl March 3, 2006, 9:37 p.m. UTC | #2
Hi,

Darren Salt wrote:

> I demand that C.Y.M may or may not have written...
> 
>> I noticed some warnings when compiling xine-0.7.7 and vdr-1.3.44.  Here is
>> a patch.
> 
> I'm *not* seeing these warnings. Which version of g++, what options? (I'm
> using g++ 4.0.3 20060212 (Debian 4.0.2-9); I've tried -Wall -Wextra.)

Well, it is reported on my system with

	gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)

and

	-O0 -g3 -Wall -Woverloaded-virtual -Wformat=2 -Wextra

but, I didn't find it among the various "unused parameter" messages of 
VDR's header files.

Bye.
  
Darren Salt March 3, 2006, 10:01 p.m. UTC | #3
I demand that Reinhard Nissl may or may not have written...

> Darren Salt wrote:
>> I demand that C.Y.M may or may not have written...
>>> I noticed some warnings when compiling xine-0.7.7 and vdr-1.3.44.  Here
>>> is a patch.
>> I'm *not* seeing these warnings. Which version of g++, what options? (I'm
>> using g++ 4.0.3 20060212 (Debian 4.0.2-9); I've tried -Wall -Wextra.)

> Well, it is reported on my system with
> 	gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
> and
> 	-O0 -g3 -Wall -Woverloaded-virtual -Wformat=2 -Wextra
[snip]

With -Woverloaded-virtual, I'm seeing these warnings. I think that I'll start
using that one...
  
C.Y.M March 3, 2006, 10:21 p.m. UTC | #4
Reinhard Nissl wrote:
> Hi,
> 
> Darren Salt wrote:
> 
>> I demand that C.Y.M may or may not have written...
>>
>>> I noticed some warnings when compiling xine-0.7.7 and vdr-1.3.44. 
>>> Here is
>>> a patch.
>>
>> I'm *not* seeing these warnings. Which version of g++, what options? (I'm
>> using g++ 4.0.3 20060212 (Debian 4.0.2-9); I've tried -Wall -Wextra.)
> 
> Well, it is reported on my system with
> 
>     gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
> 
> and
> 
>     -O0 -g3 -Wall -Woverloaded-virtual -Wformat=2 -Wextra
> 
> but, I didn't find it among the various "unused parameter" messages of
> VDR's header files.
> 

I am using gcc-3.4.

The warnings look like this:

../../../include/vdr/osd.h:284: warning: `virtual void cOsd::DrawBitmap(int,
int, const cBitmap&, tColor, tColor, bool, bool)' was hidden

It has to do with the new transparency DrawBitmap function added to VDR.

Best Regards,
  

Patch

--- xineOsd.c.orig	2006-03-03 00:01:36.000000000 -0800
+++ xineOsd.c	2006-03-03 00:05:02.000000000 -0800
@@ -258,10 +258,10 @@ 
 //    fprintf(stderr, "drawbitmap\n");
   }
 #else  
-  void cXineOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg /* = 0 */, tColor ColorBg /* = 0 */, bool ReplacePalette /* = false */)
+  void cXineOsd::DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg /* = 0 */, tColor ColorBg /* = 0 */, bool ReplacePalette /* = false */, bool Overlay /* = false */)
   {
     cMutexLock osdLock(&m_osdMutex);
-    cOsd::DrawBitmap(x, y, Bitmap, ColorFg, ColorBg, ReplacePalette);
+    cOsd::DrawBitmap(x, y, Bitmap, ColorFg, ColorBg, ReplacePalette, Overlay);
 //    fprintf(stderr, "drawbitmap\n");
   }
 #endif
--- xineOsd.h.orig	2006-03-03 00:00:29.000000000 -0800
+++ xineOsd.h	2006-03-03 00:01:11.000000000 -0800
@@ -51,7 +51,7 @@ 
 #if VDRVERSNUM < 10327    
     virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0);
 #else
-    virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool ReplacePalette = false);
+    virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool ReplacePalette = false, bool Overlay = false);
 #endif    
     virtual void DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width = 0, int Height = 0, int Alignment = taDefault);
     virtual void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color);