[MPlayer-dev-eng] [PATCH] yet another batch of compiler warning fixes

Dominik Mierzejewski dominik at rangers.eu.org
Sat Nov 23 12:56:22 CET 2002


On Saturday, 23 November 2002, Michael Niedermayer wrote:
> Hi
> 
> On Friday 22 November 2002 17:07, Dominik Mierzejewski wrote:
> > One patch to fix some warnings within GUI code.
> iam leaving this for .so to apply (or reject)
> 
> > One patch to check for -Wall option support in compiler and use it.
> applied
> 
> > And one patch to fix some more warnings in mplayer code, mostly
> > unused variables.
> applied

Thanks. BTW, this hunk:
--- MPlayer-20021122/libmpdvdkit2/nav_read.c.warn       Sat Aug 17 00:50:22 2002
+++ MPlayer-20021122/libmpdvdkit2/nav_read.c    Fri Nov 22 16:22:01 2002
@@ -95,7 +95,7 @@
   /* pci hli btnit */
   for(i = 0; i < pci->hli.hl_gi.btngr_ns; i++) {
     for(j = 0; j < (36 / pci->hli.hl_gi.btngr_ns); j++) {
-      int n = (36 / pci->hli.hl_gi.btngr_ns) * i + j;
+/*      int n = (36 / pci->hli.hl_gi.btngr_ns) * i + j;*/
       assert(pci->hli.btnit[n].zero1 == 0);
       assert(pci->hli.btnit[n].zero2 == 0);
       assert(pci->hli.btnit[n].zero3 == 0);

wasn't very good, I should've come up with a better patch.
Something like this should fix it better:

--- MPlayer-20021123/libmpdvdkit2/nav_read.c.warn       Sat Nov 23 12:17:45 2002
+++ MPlayer-20021123/libmpdvdkit2/nav_read.c    Sat Nov 23 12:31:54 2002
@@ -95,7 +95,9 @@
   /* pci hli btnit */
   for(i = 0; i < pci->hli.hl_gi.btngr_ns; i++) {
     for(j = 0; j < (36 / pci->hli.hl_gi.btngr_ns); j++) {
-/*      int n = (36 / pci->hli.hl_gi.btngr_ns) * i + j;*/
+#ifdef HAVE_ASSERT_H
+      int n = (36 / pci->hli.hl_gi.btngr_ns) * i + j;
+#endif
       assert(pci->hli.btnit[n].zero1 == 0);
       assert(pci->hli.btnit[n].zero2 == 0);
       assert(pci->hli.btnit[n].zero3 == 0);

to follow assert() usage in this file.

PS. Do you think I could start applying such patches myself directly
into CVS? After posting them here for review, of course. I already
have CVS rw access (which I only used to fix some URLs on the homepage
so far).

-- 
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"



More information about the MPlayer-dev-eng mailing list