Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iwAam-0001Su-Cx for mharc-grub-devel@gnu.org; Mon, 27 Jan 2020 15:02:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34659) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwAaj-0001Sn-O4 for grub-devel@gnu.org; Mon, 27 Jan 2020 15:02:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwAah-0006pm-VB for grub-devel@gnu.org; Mon, 27 Jan 2020 15:02:36 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52481 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iwAah-0006p0-KD for grub-devel@gnu.org; Mon, 27 Jan 2020 15:02:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580155354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5cifNmuI8YOIllL6hofyKq9wssCcWs9bewL5Zsa0jdw=; b=II3MUg4UVgnZLu52S2NT+5vDaU0RlYB2BY58Y36kgOu6MfLB2yYZRBSWSPZc386Az0X9H7 mmNm8RAprbUYg+UZc65QWOF/NCRz70qSOWxeAaE/g2LtLwrDXhkAZuRdz5l/X5aD9zSB92 j58amJMzubF3oTQaR1rbdRy2zy5aSaE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-102-VZ-b6WCVNfmyTDpaESuJJg-1; Mon, 27 Jan 2020 15:01:22 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 53F4918B9FC6; Mon, 27 Jan 2020 20:01:21 +0000 (UTC) Received: from trillian.uncooperative.org.com (dhcp-10-20-1-15.bss.redhat.com [10.20.1.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id D7C5D5C1D6; Mon, 27 Jan 2020 20:01:20 +0000 (UTC) From: Peter Jones To: grub-devel@gnu.org Cc: Daniel Kiper , Peter Jones Subject: [PATCH] Fix an uninitialized variable. Date: Mon, 27 Jan 2020 15:01:16 -0500 Message-Id: <20200127200116.908544-1-pjones@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: VZ-b6WCVNfmyTDpaESuJJg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 207.211.31.120 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2020 20:02:39 -0000 gcc says: grub-core/fs/squash4.c: In function =E2=80=98direct_read=E2=80=99: grub-core/fs/squash4.c:868:10: error: =E2=80=98err=E2=80=99 may be used uni= nitialized in this function [-Werror=3Dmaybe-uninitialized] 868 | if (err) | ^ cc1: all warnings being treated as errors This patch initializes it to 0. Signed-off-by: Peter Jones --- grub-core/fs/squash4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/fs/squash4.c b/grub-core/fs/squash4.c index 95d5c1e1ff4..0583aeab8e8 100644 --- a/grub-core/fs/squash4.c +++ b/grub-core/fs/squash4.c @@ -746,7 +746,7 @@ direct_read (struct grub_squash_data *data, =09 struct grub_squash_cache_inode *ino, =09 grub_off_t off, char *buf, grub_size_t len) { - grub_err_t err; + grub_err_t err =3D 0; grub_off_t cumulated_uncompressed_size =3D 0; grub_uint64_t a =3D 0; grub_size_t i; --=20 2.24.1