[xiph-cvs] cvs commit: avl avl.c

Karl Heyes karl at xiph.org
Mon Jul 28 17:30:36 PDT 2003



karl        03/07/28 20:30:36

  Modified:    .        avl.c
  Log:
  another compiler cleanup wrt 64bit int/pointer mismatches, thanks to
  the ports maintainers

Revision  Changes    Path
1.8       +5 -5      avl/avl.c

Index: avl.c
===================================================================
RCS file: /usr/local/cvsroot/avl/avl.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- avl.c	7 Jul 2003 03:37:23 -0000	1.7
+++ avl.c	29 Jul 2003 00:30:36 -0000	1.8
@@ -22,7 +22,7 @@
  *
  */
 
-/* $Id: avl.c,v 1.7 2003/07/07 03:37:23 brendan Exp $ */
+/* $Id: avl.c,v 1.8 2003/07/29 00:30:36 karl Exp $ */
 
 /*
  * This is a fairly straightfoward translation of a prototype
@@ -987,11 +987,11 @@
     long lh = avl_verify_balance (node->left);
     long rh = avl_verify_balance (node->right);
     if ((rh - lh) != AVL_GET_BALANCE(node)) {
-      fprintf (stderr, "invalid balance at node %d\n", (int) node->key);
+      fprintf (stderr, "invalid balance at node %ld\n", (long) node->key);
       exit(1);
     }
     if (((lh - rh) > 1) || ((lh - rh) < -1)) {
-      fprintf (stderr, "unbalanced at node %d\n", (int) node->key);
+      fprintf (stderr, "unbalanced at node %ld\n", (long) node->key);
       exit(1);
     }
     return (1 + AVL_MAX (lh, rh));
@@ -1002,7 +1002,7 @@
 avl_verify_parent (avl_node * node, avl_node * parent)
 {
   if (node->parent != parent) {
-    fprintf (stderr, "invalid parent at node %d\n", (int) node->key);
+    fprintf (stderr, "invalid parent at node %ld\n", (long) node->key);
     exit(1);
   }
   if (node->left) {
@@ -1027,7 +1027,7 @@
       num_right = avl_verify_rank (node->right);
     }
     if (AVL_GET_RANK (node) != num_left + 1) {
-      fprintf (stderr, "invalid rank at node %d\n", (int) node->key);
+      fprintf (stderr, "invalid rank at node %ld\n", (long) node->key);
       exit (1);
     }
     return (num_left + num_right + 1);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list