From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Oyp3V-0002NT-I0 for mharc-grub-devel@gnu.org; Thu, 23 Sep 2010 12:53:57 -0400 Received: from [140.186.70.92] (port=58163 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oyp3S-0002M3-8j for grub-devel@gnu.org; Thu, 23 Sep 2010 12:53:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oyp3Q-0000x5-Fw for grub-devel@gnu.org; Thu, 23 Sep 2010 12:53:53 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:51875) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oyp3Q-0000ws-BV for grub-devel@gnu.org; Thu, 23 Sep 2010 12:53:52 -0400 Received: by wwb24 with SMTP id 24so2006909wwb.30 for ; Thu, 23 Sep 2010 09:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=5pVCZ3PtpoJLl8veX5UAzf5Ckol8gwC4x3eOjav23zI=; b=whMFGlgQC5uhtpIMzpTm4Oa7ToSZoRuOXeKEJ0Vtqc+mjuKUmHdtYZmw83dsWlzFag wzQtOKg+Tw9I3NVGsbwhEzZZfskXCgGlboqxCtAjyDBPavhEkbsjIeNyiJVbcbHprrqT 5x1haeL3UcpxYuPQ8lV4wIFJq6N+PGZJDmXx8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=wTvg2M1MVsFPQVMCW+VS10CnAM8asKACmUENiJPXqRZTOfJ2xq+M5jDv+4zdmnzv4T ogZahJKweJryIFHtql9i8/tHUXWoHixiB4GUJO64mECDI12BPqZ7Fo43MqPmhLR3a/x6 PHhWR6okDrFADvtkANNSpu/CsL2EqedOtsGro= Received: by 10.227.43.9 with SMTP id u9mr1884876wbe.41.1285260831561; Thu, 23 Sep 2010 09:53:51 -0700 (PDT) Received: from [147.210.129.4] (laptop-147-210-129-4.labri.fr [147.210.129.4]) by mx.google.com with ESMTPS id fz1sm883208wbb.0.2010.09.23.09.53.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 23 Sep 2010 09:53:50 -0700 (PDT) Message-ID: <4C9B861D.9000106@gmail.com> Date: Thu, 23 Sep 2010 18:53:49 +0200 From: =?ISO-8859-1?Q?Gr=E9goire_Sutre?= User-Agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.9.1.11) Gecko/20100723 Lightning/1.0b2pre Shredder/3.0.6 MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [PATCH] Uninitialized variable X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2010 16:53:56 -0000 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 * 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) {