[MPlayer-dev-eng] squelch some warnings (patches incl.)

Elias Pipping elias at pipping.org
Sat Feb 23 19:19:33 CET 2008


On Sat, Feb 23, 2008 at 06:29:11PM +0100, Diego Biurrun wrote:
> On Fri, Feb 22, 2008 at 02:56:46PM +0100, Elias Pipping wrote:
> > 
> > I've attached a couple of patches to squelch some warnings, mostly on
> > Mac OS X (tested with 10.5.2 on an Intel Mac).
> 
> What warnings is this supposed to fix?

  % svn up >/dev/null
  % ./configure >/dev/null
  % make -j3 2>&1 >/dev/null | grep 'implicit declaration' | nl
     1  cpudetect.c:344: warning: implicit declaration of function ‘sysctlbyname’
     2  mp_image.h:211: warning: implicit declaration of function ‘malloc’
     3  mp_image.h:211: warning: incompatible implicit declaration of built-in function ‘malloc’
     4  mp_image.h:223: warning: implicit declaration of function ‘free’
     5  vf_ow.c:218: warning: incompatible implicit declaration of built-in function ‘malloc’
     6  vf_ow.c:303: warning: incompatible implicit declaration of built-in function ‘malloc’
     7  driver.c:143: warning: implicit declaration of function ‘CodecRelease’
     8  driver.c:165: warning: implicit declaration of function ‘CodecAlloc’
     9  afl.c:108: warning: implicit declaration of function ‘DrvClose’
    10  afl.c:221: warning: implicit declaration of function ‘DrvOpen’
    11  afl.c:505: warning: implicit declaration of function ‘CodecAlloc’
    12  afl.c:534: warning: implicit declaration of function ‘CodecRelease’
    13  vfl.c:78: warning: implicit declaration of function ‘DrvOpen’
    14  vfl.c:220: warning: implicit declaration of function ‘DrvClose’
    15  ldt_keeper.c:243: warning: implicit declaration of function ‘i386_set_ldt’
    16  misc.h:188: warning: implicit declaration of function ‘_ilog’
    17  misc.h:188: warning: previous implicit declaration of ‘_ilog’ was here
    18  misc.h:188: warning: implicit declaration of function ‘_ilog’
    19  misc.h:188: warning: implicit declaration of function ‘abs’
    20  misc.h:188: warning: implicit declaration of function ‘abs’
    21  misc.h:188: warning: implicit declaration of function ‘_ilog’
    22  misc.h:188: warning: previous implicit declaration of ‘_ilog’ was here
    23  misc.h:188: warning: implicit declaration of function ‘abs’
    24  misc.h:188: warning: implicit declaration of function ‘_ilog’
    25  nav_read.c:58: warning: implicit declaration of function ‘abort’
    26  nav_read.c:58: warning: incompatible implicit declaration of built-in function ‘abort’
    27  nav_read.c:108: warning: incompatible implicit declaration of built-in function ‘abort’
    28  nav_read.c:272: warning: incompatible implicit declaration of built-in function ‘abort’
    29  snow.c:4404: warning: implicit declaration of function ‘dwt_quantize’
  %

The patches in my previous mail take care of lines 1-6, 15, 19-20, 23,
and 25-28.

  % make distclean >/dev/null
  % patch -p0 < ~/mplayer-1.0-include-stdlib_new.patch 
  patching file dvdread/nav_read.c
  patching file tremor/misc.h
  patching file libmpcodecs/mp_image.h
  % patch -p0 < ~/mplayer-1.0-macosx-include-sysctl.patch
  patching file cpudetect.c
  % patch -p0 < ~/mplayer-1.0-macosx-include-time.patch  
  patching file libao2/ao_macosx.c
  Hunk #1 succeeded at 49 with fuzz 2 (offset 3 lines).
  % patch -p0 < ~/mplayer-1.0-macosx-include-user_ldt.patch
  patching file loader/ldt_keeper.c
  Hunk #1 succeeded at 57 (offset -1 lines).
  % ./configure >/dev/null
  % ./configure >/dev/null
  % make -j3 2>&1 >/dev/null | grep 'implicit declaration' | nl
     1  driver.c:143: warning: implicit declaration of function ‘CodecRelease’
     2  driver.c:165: warning: implicit declaration of function ‘CodecAlloc’
     3  afl.c:108: warning: implicit declaration of function ‘DrvClose’
     4  afl.c:221: warning: implicit declaration of function ‘DrvOpen’
     5  afl.c:505: warning: implicit declaration of function ‘CodecAlloc’
     6  afl.c:534: warning: implicit declaration of function ‘CodecRelease’
     7  vfl.c:78: warning: implicit declaration of function ‘DrvOpen’
     8  vfl.c:220: warning: implicit declaration of function ‘DrvClose’
     9  misc.h:189: warning: implicit declaration of function ‘_ilog’
    10  misc.h:189: warning: previous implicit declaration of ‘_ilog’ was here
    11  misc.h:189: warning: implicit declaration of function ‘_ilog’
    12  misc.h:189: warning: implicit declaration of function ‘_ilog’
    13  misc.h:189: warning: previous implicit declaration of ‘_ilog’ was here
    14  misc.h:189: warning: implicit declaration of function ‘_ilog’
    15  snow.c:4404: warning: implicit declaration of function ‘dwt_quantize’
  %

The last line is being taken care of by this[1] patch (attached, too).


-- Elias

[1] http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/media-video/mplayer/files/mplayer-1.0-quantize2.patch?rev=17019
-------------- next part --------------
--- libavcodec/snow.c
+++ libavcodec/snow.c
@@ -4390,10 +4390,11 @@
             }
         }
 
-        if(QUANTIZE2)
+#if QUANTIZE2 == 1
             dwt_quantize(s, p, s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type);
-        else
+#else
             ff_spatial_dwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count);
+#endif
 
         if(s->pass1_rc && plane_index==0){
             int delta_qlog = ratecontrol_1pass(s, pict);
@@ -4413,8 +4414,9 @@
             for(orientation=level ? 1 : 0; orientation<4; orientation++){
                 SubBand *b= &p->band[level][orientation];
 
-                if(!QUANTIZE2)
+#if QUANTIZE2 == 0
                     quantize(s, b, b->ibuf, b->buf, b->stride, s->qbias);
+#endif
                 if(orientation==0)
                     decorrelate(s, b, b->ibuf, b->stride, pict->pict_type == P_TYPE, 0);
                 encode_subband(s, b, b->ibuf, b->parent ? b->parent->ibuf : NULL, b->stride, orientation);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080223/fa1d4721/attachment.pgp>


More information about the MPlayer-dev-eng mailing list