+2011-12-26 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/squash4.c (squash_mount): Mark endian conversion in
+ case statements as compile-time one.
+ (direct_read): Prevent spurious warnings.
+ (grub_squash_read_data): Likewise.
+
2011-12-26 Vladimir Serbinenko <phcoder@gmail.com>
Various squash4 fixes and LZO and XZ support.
switch (sb.compression)
{
- case grub_cpu_to_le16 (COMPRESSION_ZLIB):
+ case grub_cpu_to_le16_compile_time (COMPRESSION_ZLIB):
data->decompress = zlib_decompress;
break;
- case grub_cpu_to_le16 (COMPRESSION_LZO):
+ case grub_cpu_to_le16_compile_time (COMPRESSION_LZO):
data->decompress = lzo_decompress;
break;
- case grub_cpu_to_le16 (COMPRESSION_XZ):
+ case grub_cpu_to_le16_compile_time (COMPRESSION_XZ):
data->decompress = xz_decompress;
data->xzbuf = grub_malloc (XZBUFSIZ);
if (!data->xzbuf)
{
grub_err_t err;
grub_off_t cumulated_uncompressed_size = 0;
- grub_uint64_t a;
+ grub_uint64_t a = 0;
grub_size_t i;
grub_size_t origlen = len;
if (!ino->block_sizes)
{
- grub_off_t total_size;
+ grub_off_t total_size = 0;
grub_size_t total_blocks;
- grub_size_t block_offset;
+ grub_size_t block_offset = 0;
switch (ino->ino.type)
{
case grub_cpu_to_le16_compile_time (SQUASH_TYPE_LONG_REGULAR):
grub_off_t off, char *buf, grub_size_t len)
{
grub_err_t err;
- grub_uint64_t a, b;
- grub_uint32_t fragment;
+ grub_uint64_t a = 0, b;
+ grub_uint32_t fragment = 0;
int compressed = 0;
struct grub_squash_frag_desc frag;