mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
* grub-core/script/argv.c (round_up_exp): unsigned is 32-bit on all
supported platforms. Put a compile time assert for this rather than generate a warning with 32-bit shift.
This commit is contained in:
1 parent
5d4f4dd51b
commit
80f23be71f
2 files changed
+8
-3
No files matched your search
@@ -1,3 +1,9 @@
|
||||
2011-01-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/script/argv.c (round_up_exp): unsigned is 32-bit on all
|
||||
supported platforms. Put a compile time assert for this rather than
|
||||
generate a warning with 32-bit shift.
|
||||
|
||||
2011-01-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/disk/scsi.c (grub_scsi_read): Fix binary and check and make
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
static unsigned
|
||||
round_up_exp (unsigned v)
|
||||
{
|
||||
COMPILE_TIME_ASSERT (sizeof (v) == 4);
|
||||
|
||||
v--;
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
@@ -32,9 +34,6 @@ round_up_exp (unsigned v)
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
|
||||
if (sizeof (v) > 4)
|
||||
v |= v >> 32;
|
||||
|
||||
v++;
|
||||
v += (v == 0);
|
||||
|
||||
|
||||
Reference in new issue
Block a user