[MPlayer-cvslog] r23727 - trunk/libdvdcss/libdvdcss.c

Diego Biurrun diego at biurrun.de
Thu Aug 21 22:41:53 CEST 2008


I'm working on moving our libdvdcss patches upstream...

On Tue, Jul 17, 2007 at 12:37:30AM +0200, Reimar Döffinger wrote:
> On Mon, Jul 16, 2007 at 11:24:17PM +0200, Diego Biurrun wrote:
> > On Sat, Jul 14, 2007 at 03:23:46PM +0200, Reimar Döffinger wrote:
> > > On Sat, Jul 14, 2007 at 02:50:00PM +0200, Diego Biurrun wrote:
> > > > On Sat, Jul 14, 2007 at 10:06:31AM +0200, Reimar Döffinger wrote:
> > > > > It is not a very relevant change though (esp. compared to  r23728).
> > > > > You could also cast all parameters to unsigned instead.
> > > > > IMO using sprintf (and even snprintf) here is a stupid idea anyway.
> > > > 
> > > > I'm asking because I wish to keep our diffs to upstream as small as
> > > > possible.  If r23728 is enough to solve the problem then this might as
> > > > well be reverted.
> > > 
> > > It solves the critical problem, but without it the format strings do not
> > > match the type, though I do not know on what type of system it will make
> > > a difference.
> > 
> > Umm, you mean Ivan's commit solves the critical problem while yours makes
> > the types match?
> > 
> > My point is that if your commit is more or less cosmetic then I would
> > suggest reverting it to minimize the diff towards upstream.
> 
> AFAICT sprintf behaviour is unspecified when the types mismatch as is
> the case without this patch.
> But actually this is moot, since AFAICT sprintf isn't really specified
> sufficiently to be used in this way if you are pedantic. Which is why I
> proposed a different patch on libdvdcss-devel

Your patch does not even compile:

cc -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -I. -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 -march=k6-3 -mtune=k6-3 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/usr/include/directfb -I/usr/include/  -I/usr/include/SDL  -D_REENTRANT -I/usr/include/kde/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12   -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\"    -c -o libdvdcss/libdvdcss.o libdvdcss/libdvdcss.c
libdvdcss/libdvdcss.c: In function 'to_hex':
libdvdcss/libdvdcss.c:155: warning: initialization makes integer from pointer without a cast
libdvdcss/libdvdcss.c:156: warning: initialization makes integer from pointer without a cast
libdvdcss/libdvdcss.c:159: error: invalid type argument of 'unary *'
libdvdcss/libdvdcss.c:159: warning: passing argument 1 of 'put_hex4' makes pointer from integer without a cast
libdvdcss/libdvdcss.c:160: error: invalid type argument of 'unary *'
libdvdcss/libdvdcss.c:160: warning: passing argument 1 of 'put_hex4' makes pointer from integer without a cast
make: *** [libdvdcss/libdvdcss.o] Error 1


I have attached the patch for reference.

Diego
-------------- next part --------------
A non-text attachment was scrubbed...
Name: print_hex.diff
Type: text/x-diff
Size: 2645 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/attachments/20080821/b9ae822c/attachment.diff>


More information about the MPlayer-cvslog mailing list