]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-07-04 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Fri, 4 Jul 2008 02:12:54 +0000 (02:12 +0000)
committerproski <proski@localhost>
Fri, 4 Jul 2008 02:12:54 +0000 (02:12 +0000)
* include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
pointer, which can cause warnings.  Support 64-bit addresses.

ChangeLog
include/grub/misc.h

index 179dc2994617e985159c477c2530ca1fd73bd05a..baed5558a6c8df949181969f02e627c90023c55d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-07-04  Pavel Roskin  <proski@gnu.org>
 
+       * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
+       pointer, which can cause warnings.  Support 64-bit addresses.
+
        * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
        of sizeof(long).  This fixes PowerPC image generation on x86_64.
 
index 86bc456e4ef88e2011f315dbd5969292ad562d74..3d89a60804b2a3362e04a4b4885f408e775d9c55 100644 (file)
@@ -25,7 +25,7 @@
 #include <grub/symbol.h>
 #include <grub/err.h>
 
-#define ALIGN_UP(addr, align) ((long)((char *)addr + align - 1) & ~(align - 1))
+#define ALIGN_UP(addr, align) (((grub_uint64_t)addr + align - 1) & ~(align - 1))
 
 #define grub_dprintf(condition, fmt, args...) grub_real_dprintf(__FILE__, __LINE__, condition, fmt, ## args);
 /* XXX: If grub_memmove is too slow, we must implement grub_memcpy.  */