]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Thu, 18 Jun 2009 13:51:06 +0000 (13:51 +0000)
committerphcoder <phcoder@localhost>
Thu, 18 Jun 2009 13:51:06 +0000 (13:51 +0000)
Fix warnings

* fs/ntfscomp.c (decomp_get16): initialize c1 and c2
(decomp_block): initialize ch
use grub_memcpy instead of memcpy

ChangeLog
fs/ntfscomp.c

index e582d91ba2f9dc9bba1e55b349491377a05adf5b..589fad1f6a2a83542ca29888abaed5c02fc3308d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       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  <proski@gnu.org>
 
        * include/grub/i386/coreboot/console.h: Don't use the i386-pc
index b021c358fa78b64e12a706845ede82ad69db62ce..20c79ac07d876bdff1492f2f8efc94b0322b21c7 100644 (file)
@@ -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;