changeset 2229:33ffac81f4c7

eliminate warnings.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sat, 15 Dec 2007 00:03:37 +0900
parents 0f2ac612f318
children 581a057768c2
files src/vtx/lh5dec.c src/vtx/vtx.c src/vtx/vtxfile.c
diffstat 3 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/vtx/lh5dec.c	Fri Dec 14 23:36:11 2007 +0900
+++ b/src/vtx/lh5dec.c	Sat Dec 15 00:03:37 2007 +0900
@@ -92,7 +92,10 @@
     start[i] >>= jutbits;
     weight[i] = 1U << (tablebits - i);
   }
-  while (i <= 16) weight[i++] = 1U << (16 - i);
+  while (i <= 16) {
+      weight[i] = 1U << (16 - i);
+      i++;
+  }
 
   i = start[tablebits + 1] >> jutbits;
   if (i != (unsigned short)(1U << 16)) {
--- a/src/vtx/vtx.c	Fri Dec 14 23:36:11 2007 +0900
+++ b/src/vtx/vtx.c	Sat Dec 15 00:03:37 2007 +0900
@@ -96,7 +96,6 @@
 vtx_get_song_tuple_from_vtx(const gchar *filename, ayemu_vtx_t *in)
 {
   Tuple *out = aud_tuple_new_from_filename(filename);
-  gchar *string;
 
   aud_tuple_associate_string(out, FIELD_ARTIST, NULL, in->hdr.author);
   aud_tuple_associate_string(out, FIELD_TITLE, NULL, in->hdr.title);
@@ -159,7 +158,7 @@
 	  }
 	else
 	  {			/* get next AY register frame */
-	    if (ayemu_vtx_get_next_frame (&vtx, regs) == 0)
+	    if (ayemu_vtx_get_next_frame (&vtx, (char *)regs) == 0)
 	      {
 		playback->eof = TRUE;
 		donow = need;
--- a/src/vtx/vtxfile.c	Fri Dec 14 23:36:11 2007 +0900
+++ b/src/vtx/vtxfile.c	Sat Dec 15 00:03:37 2007 +0900
@@ -192,11 +192,11 @@
   aud_vfs_fclose (vtx->fp);
   vtx->fp = NULL;
   if ((vtx->regdata = (char *) malloc (vtx->hdr.regdata_size)) == NULL) {
-    fprintf (stderr, "ayemu_vtx_load_data: Can allocate %d bytes for unpack register data\n", vtx->hdr.regdata_size);
+    fprintf (stderr, "ayemu_vtx_load_data: Can allocate %d bytes for unpack register data\n", (int)(vtx->hdr.regdata_size));
     free (packed_data);
     return NULL;
   }
-  lh5_decode (packed_data, vtx->regdata, vtx->hdr.regdata_size, packed_size);
+  lh5_decode ((unsigned char *)packed_data, (unsigned char *)(vtx->regdata), vtx->hdr.regdata_size, packed_size);
   free (packed_data);
   vtx->pos = 0;
   return vtx->regdata;