* grub-core/disk/dmraid_nvidia.c: Fix potentially uninited "layout".

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-10-18 16:36:09 +02:00
parent fb320faf88
commit 757e3eb7c3
2 changed files with 6 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2013-10-18 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/dmraid_nvidia.c: Fix potentially uninited "layout".
2013-10-18 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/misc.h: Don't use warn_unused_result on gcc < 3.4.

View file

@ -98,7 +98,6 @@ grub_dmraid_nv_detect (grub_disk_t disk,
grub_disk_addr_t sector;
struct grub_nv_super sb;
int level;
int layout;
grub_uint64_t disk_size;
char *uuid;
@ -139,7 +138,6 @@ grub_dmraid_nv_detect (grub_disk_t disk,
case NV_LEVEL_5:
level = 5;
layout = GRUB_RAID_LAYOUT_LEFT_ASYMMETRIC;
disk_size = sb.capacity / (sb.array.total_volumes - 1);
break;
@ -164,7 +162,8 @@ grub_dmraid_nv_detect (grub_disk_t disk,
return grub_diskfilter_make_raid (sizeof (sb.array.signature),
uuid, sb.array.total_volumes,
NULL, disk_size,
sb.array.stripe_block_size, layout,
sb.array.stripe_block_size,
GRUB_RAID_LAYOUT_LEFT_ASYMMETRIC,
level);
}