From 09b3490b9d3f57fed992edb456e9fb023b5c5396 Mon Sep 17 00:00:00 2001 From: phcoder Date: Thu, 18 Jun 2009 13:51:06 +0000 Subject: [PATCH] 2009-06-18 Vladimir Serbinenko Fix warnings * fs/ntfscomp.c (decomp_get16): initialize c1 and c2 (decomp_block): initialize ch use grub_memcpy instead of memcpy --- ChangeLog | 8 ++++++++ fs/ntfscomp.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e582d91ba..589fad1f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-06-18 Vladimir Serbinenko + + Fix warnings + + * fs/ntfscomp.c (decomp_get16): initialize c1 and c2 + (decomp_block): initialize ch + use grub_memcpy instead of memcpy + 2009-06-17 Pavel Roskin * include/grub/i386/coreboot/console.h: Don't use the i386-pc diff --git a/fs/ntfscomp.c b/fs/ntfscomp.c index b021c358f..20c79ac07 100644 --- a/fs/ntfscomp.c +++ b/fs/ntfscomp.c @@ -57,7 +57,7 @@ decomp_getch (struct grub_ntfs_comp *cc, unsigned char *res) static grub_err_t decomp_get16 (struct grub_ntfs_comp *cc, grub_uint16_t * res) { - unsigned char c1, c2; + unsigned char c1 = 0, c2 = 0; if ((decomp_getch (cc, &c1)) || (decomp_getch (cc, &c2))) return grub_errno; @@ -134,7 +134,7 @@ decomp_block (struct grub_ntfs_comp *cc, char *dest) } else { - unsigned char ch; + unsigned char ch = 0; if (decomp_getch (cc, &ch)) return grub_errno; @@ -163,7 +163,7 @@ decomp_block (struct grub_ntfs_comp *cc, char *dest) n = cnt; if ((dest) && (n)) { - memcpy (dest, &cc->cbuf[cc->cbuf_ofs], n); + grub_memcpy (dest, &cc->cbuf[cc->cbuf_ofs], n); dest += n; } cnt -= n;