From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web10.5114.1583542825451508650 for ; Fri, 06 Mar 2020 17:00:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eu2ooLvI; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583542824; 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: in-reply-to:in-reply-to:references:references; bh=xR5uqCvHx00XkFz6xPPqP2Cg29RXlZjARnL60lEYMHs=; b=eu2ooLvIk3h/cmoEYvaXwKc6rghuznDy8xmIj9qpDceN27Gb1cWPCHepYI/nkfr8PX+0fQ FSldPjSXTsBHIelC7fqW9NT9Aigl1idKSaQyEeCyM3/DMrs7KIM/R1hiUdyFxWP3yMB1FM DVEhQIN7Gyj1WP5Z7CNdNMli6CwY0rc= 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-490-kuO5yTWpN9KrdFIr9VOwJg-1; Fri, 06 Mar 2020 20:00:20 -0500 X-MC-Unique: kuO5yTWpN9KrdFIr9VOwJg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2CE85800D53; Sat, 7 Mar 2020 01:00:19 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-130.ams2.redhat.com [10.36.117.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 07EED272A5; Sat, 7 Mar 2020 01:00:17 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] OvmfPkg/X86QemuLoadImageLib: fix "unused variable" error in X64 DXE builds To: devel@edk2.groups.io, philmd@redhat.com Cc: Ard Biesheuvel , Jordan Justen References: <20200306230442.24100-1-lersek@redhat.com> <5e359f2c-b914-1aa7-6b47-b39a1dff9d42@redhat.com> From: "Laszlo Ersek" Message-ID: <2fd1019a-4947-05c9-874a-0faa863454b9@redhat.com> Date: Sat, 7 Mar 2020 02:00:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5e359f2c-b914-1aa7-6b47-b39a1dff9d42@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/07/20 01:01, Philippe Mathieu-Daud=C3=A9 wrote: > On 3/7/20 12:04 AM, Laszlo Ersek wrote: >> When the MDE_CPU_IA32 macro is not defined, there is no access to the >> "KernelImageHandle" local variable in QemuStartKernelImage(). This break= s >> the OvmfPkgIa32X64 and OvmfPkgX64 platform builds, at least with gcc-8. >> >> Move the local variable to the inner scope, where declaration and usage >> are inseparable. >> >> (Note that such inner-scope declarations are frowned upon in the wider >> edk2 codebase, but we use them liberally in ArmVirtPkg and OvmfPkg >> anyway, >> because they help us reason about variable lifetime and visibility.) >> >> Cc: Ard Biesheuvel >> Cc: Jordan Justen >> Cc: Philippe Mathieu-Daud=C3=A9 >> Fixes: 7c47d89003a6f8f7f6f0ce8ca7d3e87c630d14cc >> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2572 >> Signed-off-by: Laszlo Ersek >=20 > Reviewed-by: Philippe Mathieu-Daude > Tested-by: Philippe Mathieu-Daude Thank you, Phil, this really helps -- I want to push the patch as quickly as possible, due to it averting a build break. So I've submitted with your tags applied... but mergify is apparently not picking up the "push" label again... I have no idea what's going on. Laszlo