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

Michael Niedermayer michaelni at gmx.at
Sat Nov 23 13:08:43 CET 2002


Hi

On Saturday 23 November 2002 12:56, Dominik Mierzejewski wrote:
[...]
> 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.
ooops, applied

> PS. Do you think I could start applying such patches myself directly
> into CVS? After posting them here for review, of course. 
IMHO yes, but arpi is the one who must decide that

[...]

Michael



More information about the MPlayer-dev-eng mailing list