[xiph-commits] r3204 - in liboggz/trunk: . src/liboggz src/tests src/tools

shans at svn.annodex.net shans at svn.annodex.net
Tue Aug 28 03:35:45 PDT 2007


Author: shans
Date: 2007-08-28 03:35:45 -0700 (Tue, 28 Aug 2007)
New Revision: 3204

Modified:
   liboggz/trunk/configure.ac
   liboggz/trunk/src/liboggz/oggz_auto.c
   liboggz/trunk/src/liboggz/oggz_seek.c
   liboggz/trunk/src/liboggz/oggz_write.c
   liboggz/trunk/src/tests/io-read-single.c
   liboggz/trunk/src/tests/io-read.c
   liboggz/trunk/src/tests/io-seek.c
   liboggz/trunk/src/tests/io-write-flush.c
   liboggz/trunk/src/tests/io-write.c
   liboggz/trunk/src/tools/oggzrip.c
   liboggz/trunk/src/tools/skeleton.c
Log:
Getting everything to actually compile again



Modified: liboggz/trunk/configure.ac
===================================================================
--- liboggz/trunk/configure.ac	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/configure.ac	2007-08-28 10:35:45 UTC (rev 3204)
@@ -292,7 +292,7 @@
 dnl Add some useful warnings if we have gcc.
 dnl changequote(,)dnl
 if test "x$ac_cv_prog_gcc" = xyes ; then
-  CFLAGS="$CFLAGS -Wall -Wextra -g -std=gnu99 -Wdeclaration-after-statement"
+  CFLAGS="$CFLAGS -Wall -Wextra -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused"
 fi
 dnl changequote([,])dnl
 

Modified: liboggz/trunk/src/liboggz/oggz_auto.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_auto.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/liboggz/oggz_auto.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -848,7 +848,7 @@
   {"fLaC", 4, "Flac0", auto_flac0, auto_calc_flac},
   {"\177FLAC", 4, "Flac", auto_flac, auto_calc_flac},
   {"AnxData", 7, "AnxData", auto_anxdata, NULL},
-  {"", 0, "Unknown", NULL}
+  {"", 0, "Unknown", NULL, NULL}
 }; 
 
 int oggz_auto_identify (OGGZ *oggz, ogg_page *og, long serialno) {

Modified: liboggz/trunk/src/liboggz/oggz_seek.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_seek.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/liboggz/oggz_seek.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -97,8 +97,8 @@
  */
 
 int
-oggz_seek_reset_stream(void *data, void *arg) {
-  ((oggz_stream_t *)data)->last_granulepos = (int)arg;
+oggz_seek_reset_stream(void *data) {
+  ((oggz_stream_t *)data)->last_granulepos = -1L;
   return 0;
 }
 
@@ -118,7 +118,7 @@
 
   ogg_sync_reset (&reader->ogg_sync);
 
-  oggz_vector_foreach1(oggz->streams, oggz_seek_reset_stream, (void *)-1);
+  oggz_vector_foreach(oggz->streams, oggz_seek_reset_stream);
   
   return offset_at;
 }

Modified: liboggz/trunk/src/liboggz/oggz_write.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_write.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/liboggz/oggz_write.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -260,7 +260,6 @@
   if (strict) {
     if (op->bytes < 0) return OGGZ_ERR_BAD_BYTES;
     if (!suffix && b_o_s != stream->b_o_s) return OGGZ_ERR_BAD_B_O_S;
-
     if (op->granulepos != -1 && op->granulepos < stream->granulepos)
       return OGGZ_ERR_BAD_GRANULEPOS;
 
@@ -580,7 +579,7 @@
 oggz_writer_make_packet (OGGZ * oggz)
 {
   OggzWriter * writer = &oggz->x.writer;
-  oggz_writer_packet_t * zpacket, * next_zpacket;
+  oggz_writer_packet_t * zpacket, * next_zpacket = NULL;
   int cb_ret = 0;
 
 #ifdef DEBUG

Modified: liboggz/trunk/src/tests/io-read-single.c
===================================================================
--- liboggz/trunk/src/tests/io-read-single.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/tests/io-read-single.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -136,7 +136,7 @@
   /* Mark that the read IO method was actually used */
   read_called++;
 
-  len = MIN (n, bytes_generated - offset);
+  len = MIN ((int)n, bytes_generated - offset);
 
   memcpy (buf, &data_buf[offset], len);
 

Modified: liboggz/trunk/src/tests/io-read.c
===================================================================
--- liboggz/trunk/src/tests/io-read.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/tests/io-read.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -134,7 +134,7 @@
   /* Mark that the read IO method was actually used */
   read_called++;
 
-  len = MIN (n, DATA_BUF_LEN - offset);
+  len = MIN ((int)n, DATA_BUF_LEN - offset);
   memcpy (buf, &data_buf[offset], len);
 
   offset += len;

Modified: liboggz/trunk/src/tests/io-seek.c
===================================================================
--- liboggz/trunk/src/tests/io-seek.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/tests/io-seek.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -143,7 +143,7 @@
   /* Mark that the read IO method was actually used */
   read_called++;
 
-  len = MIN (n, offset_end - my_offset);
+  len = MIN ((int)n, offset_end - my_offset);
   memcpy (buf, &data_buf[my_offset], len);
 
   my_offset += len;

Modified: liboggz/trunk/src/tests/io-write-flush.c
===================================================================
--- liboggz/trunk/src/tests/io-write-flush.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/tests/io-write-flush.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -144,7 +144,7 @@
   /* Mark that the write IO method was actually used */
   write_called++;
 
-  len = MIN (n, DATA_BUF_LEN - write_offset);
+  len = MIN ((int)n, DATA_BUF_LEN - write_offset);
   memcpy (&data_buf[write_offset], buf, len);
 
   write_offset += len;

Modified: liboggz/trunk/src/tests/io-write.c
===================================================================
--- liboggz/trunk/src/tests/io-write.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/tests/io-write.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -134,7 +134,7 @@
   /* Mark that the write IO method was actually used */
   write_called++;
 
-  len = MIN (n, DATA_BUF_LEN - offset);
+  len = MIN ((int)n, DATA_BUF_LEN - offset);
   memcpy (&data_buf[offset], buf, len);
 
   offset += len;

Modified: liboggz/trunk/src/tools/oggzrip.c
===================================================================
--- liboggz/trunk/src/tools/oggzrip.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/tools/oggzrip.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -205,7 +205,7 @@
 checked_fwrite (const void *data, size_t size, size_t count, FILE *stream)
 {
   int n = fwrite (data, size, count, stream);
-  if (n != count) {
+  if ((size_t)n != count) {
     perror ("write failed");
     exit (1);
   }

Modified: liboggz/trunk/src/tools/skeleton.c
===================================================================
--- liboggz/trunk/src/tools/skeleton.c	2007-08-27 05:17:51 UTC (rev 3203)
+++ liboggz/trunk/src/tools/skeleton.c	2007-08-28 10:35:45 UTC (rev 3204)
@@ -107,9 +107,11 @@
 	
     fishead_packet fp;
 
+    /*
     if (memcmp(op->packet, FISHEAD_IDENTIFIER, 8))
-	; /* invalid packet what do we do? */
-
+	  ; invalid packet what do we do? 
+    */
+    
     fp.version_major = *((ogg_uint16_t*)(op->packet+8)); /* version major */
     fp.version_minor = *((ogg_uint16_t*)(op->packet+10)); /* version minor */
     fp.ptime_n = *((ogg_int64_t*)(op->packet+12)); /* presentationtime numerator */
@@ -126,8 +128,10 @@
 
     fisbone_packet fp;
     
+    /*
     if (memcmp(op->packet, FISBONE_IDENTIFIER, 8))
-	; /* invalid value, what do we do? */
+	  ; invalid value, what do we do? 
+    */
     fp.serial_no = *((ogg_uint32_t*)(op->packet+12)); /* serialno of the stream represented by this fisbone packet */
     fp.nr_header_packet = *((ogg_uint32_t*)(op->packet+16)); /* number of header packets */
     fp.granule_rate_n = *((ogg_int64_t*)(op->packet+20)); /* granulrate numerator */



More information about the commits mailing list