]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix warnings when compiling with -O3
authorVladimir Serbinenko <phcoder@gmail.com>
Wed, 17 Feb 2016 16:56:41 +0000 (17:56 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Wed, 17 Feb 2016 16:56:41 +0000 (17:56 +0100)
conf/Makefile.common
grub-core/commands/i386/cmostest.c
grub-core/fs/ntfscomp.c
grub-core/fs/zfs/zfs.c

index 11296b550a7cd40ded498613620f556d78c67d84..6db04343af49144ac2e9c0e9fed7d0b54f14401e 100644 (file)
@@ -65,7 +65,7 @@ grubconfdir = $(sysconfdir)/grub.d
 platformdir = $(pkglibdir)/$(target_cpu)-$(platform)
 starfielddir = $(pkgdatadir)/themes/starfield
 
-CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion
+CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-maybe-uninitialized
 CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/gnulib -I$(top_srcdir)/grub-core/gnulib
 
 CFLAGS_POSIX = -fno-builtin
index e5dea076967f7157797e76ad85639e93df011039..c839b704dc50c74f5249e6521bd64585e00ec09e 100644 (file)
@@ -45,7 +45,7 @@ static grub_err_t
 grub_cmd_cmostest (struct grub_command *cmd __attribute__ ((unused)),
                   int argc, char *argv[])
 {
-  int byte, bit;
+  int byte = 0, bit = 0;
   grub_err_t err;
   grub_uint8_t value;
 
@@ -67,7 +67,7 @@ static grub_err_t
 grub_cmd_cmosclean (struct grub_command *cmd __attribute__ ((unused)),
                    int argc, char *argv[])
 {
-  int byte, bit;
+  int byte = 0, bit = 0;
   grub_err_t err;
   grub_uint8_t value;
 
@@ -85,7 +85,7 @@ static grub_err_t
 grub_cmd_cmosset (struct grub_command *cmd __attribute__ ((unused)),
                    int argc, char *argv[])
 {
-  int byte, bit;
+  int byte = 0, bit = 0;
   grub_err_t err;
   grub_uint8_t value;
 
index 2e1ce51a8556bec6cff04a3eec596d20a2a251eb..3cd97d337ce9c68c052b3850436fb617bc272d48 100644 (file)
@@ -104,7 +104,7 @@ decomp_block (struct grub_ntfs_comp *cc, grub_uint8_t *dest)
              if (tag & 1)
                {
                  grub_uint32_t i, len, delta, code, lmask, dshift;
-                 grub_uint16_t word;
+                 grub_uint16_t word = 0;
 
                  if (decomp_get16 (cc, &word))
                    return grub_errno;
index c4ead29fbe354e6156d96f2431c442b53ef7c60a..6e1fff9e9ae226ea9de2a263777b7ddf56498f59 100644 (file)
@@ -3132,7 +3132,7 @@ make_mdn (dnode_end_t * mdn, struct grub_zfs_data *data)
 {
   void *osp;
   blkptr_t *bp;
-  grub_size_t ospsize;
+  grub_size_t ospsize = 0;
   grub_err_t err;
 
   grub_dprintf ("zfs", "endian = %d\n", mdn->endian);