All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Grégoire Sutre" <gregoire.sutre@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] Uninitialized variable
Date: Thu, 23 Sep 2010 18:53:49 +0200	[thread overview]
Message-ID: <4C9B861D.9000106@gmail.com> (raw)

Hi,

This is catched (as a warning) by gcc 4.1.3 -- gcc 4.4 does not
complain (maybe some command-line option is missing?).

Grégoire


2010-09-23  Grégoire Sutre  <gregoire.sutre@gmail.com>

	* grub-core/commands/acpihalt.c (get_sleep_type): Initialize prev.

=== modified file 'grub-core/commands/acpihalt.c'
--- grub-core/commands/acpihalt.c	2010-09-13 18:29:15 +0000
+++ grub-core/commands/acpihalt.c	2010-09-23 13:23:46 +0000
@@ -134,11 +134,11 @@ skip_ext_op (const grub_uint8_t *ptr, co
  }

  static int
  get_sleep_type (grub_uint8_t *table, grub_uint8_t *end)
  {
-  grub_uint8_t *ptr, *prev;
+  grub_uint8_t *ptr, *prev = 0;
    int sleep_type = -1;

    ptr = table + sizeof (struct grub_acpi_table_header);
    while (ptr < end && prev < ptr)
      {




             reply	other threads:[~2010-09-23 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 16:53 Grégoire Sutre [this message]
2010-09-23 22:39 ` [PATCH] Uninitialized variable Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C9B861D.9000106@gmail.com \
    --to=gregoire.sutre@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.