[Mplayer-cvslog] CVS: main/libmpdvdkit2 css.c,1.3,1.4 libdvdcss.c,1.3,1.4

Arpi of Ize arpi at mplayerhq.hu
Thu Nov 7 00:55:00 CET 2002


Update of /cvsroot/mplayer/main/libmpdvdkit2
In directory mail:/var/tmp.root/cvs-serv16361/libmpdvdkit2

Modified Files:
	css.c libdvdcss.c 
Log Message:
*HUGE* set of compiler warning fixes, unused variables removal
based on patch by Dominik Mierzejewski <dominik at rangers.eu.org>


Index: css.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/css.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- css.c	16 Aug 2002 22:50:21 -0000	1.3
+++ css.c	6 Nov 2002 23:54:26 -0000	1.4
@@ -301,7 +301,7 @@
     if(dvdcss->psz_cache){
 	int fd;
 	key_file=malloc(strlen(dvdcss->psz_cache)+12+4);
-	sprintf(key_file,"%s/%0.10x",dvdcss->psz_cache,i_block);
+	sprintf(key_file,"%s/%.10x",dvdcss->psz_cache,i_block);
 	if ( (fd=open( key_file,O_RDONLY ) ) > 0 ){
 	    if(read(fd, p_title_key, 5)==5){
 		// success!

Index: libdvdcss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/libdvdcss.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- libdvdcss.c	16 Aug 2002 22:50:22 -0000	1.3
+++ libdvdcss.c	6 Nov 2002 23:54:27 -0000	1.4
@@ -269,7 +269,7 @@
     /* if the CACHE is enabled, extract some unique disc ID */
     if(dvdcss_cache_dir){
 	char* disc_id=NULL;
-	char title_name[64];
+	/*char title_name[64];*/
 	char sector[DVDCSS_BLOCK_SIZE];
 	// 32768+40  -> disc title (32 uppercase chars)
 	// 32768+813 -> disc manufacturing date + serial no (16 digit number)
@@ -289,14 +289,14 @@
 	        for ( i=0;i<16;i++ )
 		    if ( ( title_name[i] < '0' )||( title_name[i] > '9' ) ){
 		        disc_id=malloc(16+4);
-	                sprintf( disc_id,"%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X",title_name[0],title_name[1],title_name[2],title_name[3],title_name[4],title_name[5],title_name[6],title_name[7] );
+	                sprintf( disc_id,"%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",title_name[0],title_name[1],title_name[2],title_name[3],title_name[4],title_name[5],title_name[6],title_name[7] );
 			break;
 		    }
 		if(!disc_id) disc_id=strdup(title_name);
 	    }
 	    if(disc_id){
 		// yeah, we have a disc name/id, let's set up cache path:
-		char* dir;
+		/*char* dir;*/
 		dvdcss->psz_cache = malloc(strlen(dvdcss_cache_dir)+strlen(disc_id)+4);
 		sprintf(dvdcss->psz_cache,"%s/%s",dvdcss_cache_dir,disc_id);
 		mkdir( dvdcss->psz_cache,493 );




More information about the MPlayer-cvslog mailing list