Rev 4591: (jam) Small 'const' fixes for diff-delta.c (bug #408441) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Aug 5 18:04:49 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4591 [merge]
revision-id: pqm at pqm.ubuntu.com-20090805170444-r6el9za77gdxzbfy
parent: pqm at pqm.ubuntu.com-20090804230931-hccw5j85mt25b2tz
parent: john at arbash-meinel.com-20090803165546-70ugife422zn4212
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-08-05 18:04:44 +0100
message:
  (jam) Small 'const' fixes for diff-delta.c (bug #408441)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/diff-delta.c            diffdelta.c-20090226042143-l9wzxynyuxnb5hus-1
=== modified file 'NEWS'
--- a/NEWS	2009-08-04 17:52:34 +0000
+++ b/NEWS	2009-08-05 17:04:44 +0000
@@ -70,6 +70,9 @@
   able to pass the Unicode path, but that would be client dependent.
   (John Arbash Meinel, #382709)
 
+* Fix a compile bug on Solaris having to do with const and
+  pointer-to-pointers. (John Arbash Meinel, #408441)
+
 * Fixed a NameError that occurs when merging or pulling from a URL that
   causes a redirection loop when bzr tries to read a URL as a bundle.
   (Andrew Bennetts, #400847)

=== modified file 'bzrlib/diff-delta.c'
--- a/bzrlib/diff-delta.c	2009-04-09 20:23:07 +0000
+++ b/bzrlib/diff-delta.c	2009-08-03 16:54:36 +0000
@@ -713,7 +713,10 @@
     prev_val = ~0;
     data = buffer;
     /* target size */
-    get_delta_hdr_size(&data, top);
+    /* get_delta_hdr_size doesn't mutate the content, just moves the
+     * start-of-data pointer, so it is safe to do the cast.
+     */
+    get_delta_hdr_size((unsigned char**)&data, top);
     entry = entries; /* start at the first slot */
     num_entries = 0; /* calculate the real number of entries */
     while (data < top) {




More information about the bazaar-commits mailing list