From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web11.9613.1583561417699583124 for ; Fri, 06 Mar 2020 22:10:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=Vih+Vsku; spf=pass (domain: linaro.org, ip: 209.85.128.67, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wm1-f67.google.com with SMTP id x3so5666595wmj.1 for ; Fri, 06 Mar 2020 22:10:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2DEU1DSaO00IaaXAGO5I5e4Df9DNwkg7dHZUUNINacE=; b=Vih+VskuusC2ylosLPLWWYKoIncLaxLFl/09JC3hC0WX1yagIbKffTv+2OXrMrfKwU sRwKXtpcOTpXF08jfifzJzRx/zcUn0UEX+MR1i2UJYC7dKD04TNAtUcSGjqo/S5Cxqxt UVqe9X3MISES6CD1d7lV3XYUzokbSbrwLXZIT3+ajyE1eA5Amu7FJ0zdsU73V84QbV0J sMIVQMEewXSKQ2kH26ilxrJSrMUlEtRtZ2Sw8XqibHSsGHl282njznA0DU4pBtX97rap JKw+/tfnveCLHRjZYBpZoo5RRu3PNXwL0/+hxJbrpw8tQx8GsAsSxSLaPteeI6lx0sWa QwPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2DEU1DSaO00IaaXAGO5I5e4Df9DNwkg7dHZUUNINacE=; b=gS9SwHv29MlrnTcrFa722/IFKQcCYB+UCzyxuDvZPseR0+P5Od4Rs7mnz0Ku3qR/QE lu2bqUrzQciqcs8NlWnEXkYR8k31dI0IFfjzGopfXUB2Fp2Vq3D/JCcA0PplZBOdJM78 Ib+xleeF7mvk3Mmj3IeZxYtOKU51RiYrQ5n1/RCHvfXqmmNAREXwZ7ROqI2ZQIMoy2Qr F4FBlzZdytF4pKnwm5tS8jQE8RVAzrHCxascW221IDTi/I5EtneJ2PlQoXF/uRVATkWo AgK+pfXPw8ZYCljF0THtZheNGeiW86O4tYiLWO/Ve8rnm6grxTdvj+LBefL4uL3qRZpb H4jw== X-Gm-Message-State: ANhLgQ2B/e7Zfjmro51NS2Nip4rVuTpXRUScfApe4QY7pG7RPbEd54lR oujs4CuTAb5ZCrhBTje/cIkQoi5frfErXO3v+9cbIw== X-Google-Smtp-Source: ADFU+vvOKmZe5jRfLEHrmcnRc5nmSQeOkVIDp/HSQDsEoHUAQ2fs1x4xgmt0kky6fPPv9v0GE517MD8jNGFJ9at0Ebw= X-Received: by 2002:a05:600c:24b:: with SMTP id 11mr7964249wmj.1.1583561416155; Fri, 06 Mar 2020 22:10:16 -0800 (PST) MIME-Version: 1.0 References: <20200306230442.24100-1-lersek@redhat.com> <5e359f2c-b914-1aa7-6b47-b39a1dff9d42@redhat.com> <2fd1019a-4947-05c9-874a-0faa863454b9@redhat.com> In-Reply-To: <2fd1019a-4947-05c9-874a-0faa863454b9@redhat.com> From: "Ard Biesheuvel" Date: Sat, 7 Mar 2020 07:10:04 +0100 Message-ID: Subject: Re: [edk2-devel] [PATCH] OvmfPkg/X86QemuLoadImageLib: fix "unused variable" error in X64 DXE builds To: Laszlo Ersek Cc: edk2-devel-groups-io , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , Jordan Justen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 7 Mar 2020 at 02:00, Laszlo Ersek wrote: > > 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 bre= aks > >> the OvmfPkgIa32X64 and OvmfPkgX64 platform builds, at least with gcc-8= . > >> > >> Move the local variable to the inner scope, where declaration and usag= e > >> 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 > > > > 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. > I queued it here as well: https://github.com/tianocore/edk2/pull/427