]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Added needed casts
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 13 Jan 2010 12:41:15 +0000 (13:41 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 13 Jan 2010 12:41:15 +0000 (13:41 +0100)
lib/relocator.c

index 84ead99b1a21bac88f4f5958ab606cef53d59f04..889497334c99019745c63adbfc3fbc39ef9e3021 100644 (file)
@@ -40,7 +40,8 @@ grub_relocator_new (void)
     
   ret->postchunks = ~(grub_addr_t) 0;
   ret->relocators_size = grub_relocator_jumper_size;
-  grub_dprintf ("relocator", "relocators_size=%ld\n", ret->relocators_size);
+  grub_dprintf ("relocator", "relocators_size=%lu\n",
+               (unsigned long) ret->relocators_size);
   return ret;
 }
 
@@ -103,7 +104,8 @@ get_best_header (struct grub_relocator *rel,
            hb = h;
            hbp = hp;
            *best_addr = addr;
-           grub_dprintf ("relocator", "picked %p/%lx\n", hb, addr);
+           grub_dprintf ("relocator", "picked %p/%lx\n", hb,
+                         (unsigned long) addr);
          }
       }
     else
@@ -146,7 +148,8 @@ get_best_header (struct grub_relocator *rel,
            hb = h;
            hbp = hp;
            *best_addr = addr;
-           grub_dprintf ("relocator", "picked %p/%lx\n", hb, addr);
+           grub_dprintf ("relocator", "picked %p/%lx\n", hb,
+                         (unsigned long) addr);
          }
       }
   }
@@ -221,7 +224,8 @@ malloc_in_range (struct grub_relocator *rel,
   hb = get_best_header (rel, start, end, align, size, rb, &hbp, &best_addr,
                        from_low_priv, collisioncheck);
 
-  grub_dprintf ("relocator", "best header %p/%lx\n", hb, best_addr);
+  grub_dprintf ("relocator", "best header %p/%lx\n", hb,
+               (unsigned long) best_addr);
 
   if (!hb)
     {
@@ -421,14 +425,16 @@ grub_relocator_alloc_chunk_addr (struct grub_relocator *rel, void **src,
        rel->highestnonpostaddr = start + size;  
     }
 
-  grub_dprintf ("relocator", "relocators_size=%ld\n", rel->relocators_size);
+  grub_dprintf ("relocator", "relocators_size=%ld\n",
+               (unsigned long) rel->relocators_size);
 
   if (start < target)
     rel->relocators_size += grub_relocator_backward_size;
   if (start > target)
     rel->relocators_size += grub_relocator_forward_size;
 
-  grub_dprintf ("relocator", "relocators_size=%ld\n", rel->relocators_size);
+  grub_dprintf ("relocator", "relocators_size=%ld\n",
+               (unsigned long) rel->relocators_size);
 
   chunk->src = start;
   chunk->target = target;
@@ -486,7 +492,8 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel, void **src,
 
   adjust_limits (rel, &min_addr2, &max_addr2, min_addr, max_addr);
   grub_dprintf ("relocator", "Adjusted limits from %lx-%lx to %lx-%lx\n",
-               min_addr, max_addr, min_addr2, max_addr2);
+               (unsigned long) min_addr, (unsigned long) max_addr,
+               (unsigned long) min_addr2, (unsigned long) max_addr2);
 
   do
     {
@@ -573,7 +580,7 @@ grub_relocator_prepare_relocs (struct grub_relocator *rel, grub_addr_t addr,
   grub_addr_t rels0;
 
   grub_dprintf ("relocator", "Preparing relocs (size=%ld)\n",
-               rel->relocators_size);
+               (unsigned long) rel->relocators_size);
 
   if (!malloc_in_range (rel, 0, ~(grub_addr_t)0 - rel->relocators_size + 1,
                        grub_relocator_align,