public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>
Subject: Re: [PATCH] OvmfPkg/GenericQemuLoadImageLib: Fix VS2019 UINT32 conversion error
Date: Mon, 30 Mar 2020 14:06:37 +0200	[thread overview]
Message-ID: <CAKv+Gu8aY7L9sQKUqa0ind35EHU4ycH9-LEMFJmmn5eqiSqwDg@mail.gmail.com> (raw)
In-Reply-To: <5166f7b1-aca5-fca1-43c9-942c630198b9@redhat.com>

On Mon, 30 Mar 2020 at 13:39, Laszlo Ersek <lersek@redhat.com> wrote:
>
> On 03/29/20 15:51, Ard Biesheuvel wrote:
> > Building OVMF for X64 with secure boot enabled on VS2019 results in
> > the following error:
> >
> >   d:\a\1\s\OvmfPkg\Library\GenericQemuLoadImageLib\GenericQemuLoadImageLib.c(154):
> >     error C2220: the following warning is treated as an error
> >   d:\a\1\s\OvmfPkg\Library\GenericQemuLoadImageLib\GenericQemuLoadImageLib.c(154):
> >     warning C4244: '=': conversion from 'UINTN' to 'UINT32', possible loss of data
> >
> > Suppress the error by making the cast explicit.
> >
> > Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2636
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > ---
> >  OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> > index f7f9a205f99d..14c8417d43e7 100644
> > --- a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> > +++ b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> > @@ -151,7 +151,7 @@ QemuLoadKernelImage (
> >      //
> >      // Drop the terminating NUL, convert to UTF-16.
> >      //
> > -    KernelLoadedImage->LoadOptionsSize = (CommandLineSize - 1) * 2;
> > +    KernelLoadedImage->LoadOptionsSize = (UINT32)((CommandLineSize - 1) * 2);
> >    }
> >
> >    QemuFwCfgSelectItem (QemuFwCfgItemInitrdSize);
> >
>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>

Thanks. Pushed as 3000c2963db319d055f474c394b062af910bbb2f

      reply	other threads:[~2020-03-30 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 13:51 [PATCH] OvmfPkg/GenericQemuLoadImageLib: Fix VS2019 UINT32 conversion error Ard Biesheuvel
2020-03-30 11:39 ` Laszlo Ersek
2020-03-30 12:06   ` Ard Biesheuvel [this message]

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-list 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=CAKv+Gu8aY7L9sQKUqa0ind35EHU4ycH9-LEMFJmmn5eqiSqwDg@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox