public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch v2] OvmfPkg: Fix build failure with VS2015 tool chain
@ 2020-03-12  4:30 Liming Gao
  2020-03-12  7:46 ` Laszlo Ersek
  0 siblings, 1 reply; 3+ messages in thread
From: Liming Gao @ 2020-03-12  4:30 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Ard Biesheuvel

warning C4244: '=': conversion from 'UINTN' to 'UINT32', possible loss of data
With this fix, OvmfIa32, OvmfX64 and OvmfIa32X64 can pass build.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
index 1868c9fcaf..1f02da2503 100644
--- a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
+++ b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
@@ -384,7 +384,7 @@ QemuLoadKernelImage (
     //
     // Drop the terminating NUL, convert to UTF-16.
     //
-    KernelLoadedImage->LoadOptionsSize = (CommandLineSize - 1) * 2;
+    KernelLoadedImage->LoadOptionsSize = (UINT32) ((CommandLineSize - 1) * 2);
   }
 
   QemuFwCfgSelectItem (QemuFwCfgItemInitrdSize);
-- 
2.13.0.windows.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch v2] OvmfPkg: Fix build failure with VS2015 tool chain
  2020-03-12  4:30 [patch v2] OvmfPkg: Fix build failure with VS2015 tool chain Liming Gao
@ 2020-03-12  7:46 ` Laszlo Ersek
  2020-03-16 15:46   ` Liming Gao
  0 siblings, 1 reply; 3+ messages in thread
From: Laszlo Ersek @ 2020-03-12  7:46 UTC (permalink / raw)
  To: Liming Gao, devel; +Cc: Ard Biesheuvel, michael.kubacki

Hello Liming,

(adding Michael)

On 03/12/20 05:30, Liming Gao wrote:
> warning C4244: '=': conversion from 'UINTN' to 'UINT32', possible loss of data
> With this fix, OvmfIa32, OvmfX64 and OvmfIa32X64 can pass build.
> 
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> ---
>  OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
> index 1868c9fcaf..1f02da2503 100644
> --- a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
> +++ b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
> @@ -384,7 +384,7 @@ QemuLoadKernelImage (
>      //
>      // Drop the terminating NUL, convert to UTF-16.
>      //
> -    KernelLoadedImage->LoadOptionsSize = (CommandLineSize - 1) * 2;
> +    KernelLoadedImage->LoadOptionsSize = (UINT32) ((CommandLineSize - 1) * 2);
>    }
>  
>    QemuFwCfgSelectItem (QemuFwCfgItemInitrdSize);
> 

This patch seems to be fixing the pre-existent TianoCore ticket

https://bugzilla.tianocore.org/show_bug.cgi?id=2582

Can you please coordinate with Michael?

BTW, I prefer this patch to the one that Michael attached to the ticket
in <https://bugzilla.tianocore.org/show_bug.cgi?id=2582#c3>.

So my suggestion is for Liming to reassign the BZ to himself please,
reference the BZ in the commit message, and then merge this patch.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks,
Laszlo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch v2] OvmfPkg: Fix build failure with VS2015 tool chain
  2020-03-12  7:46 ` Laszlo Ersek
@ 2020-03-16 15:46   ` Liming Gao
  0 siblings, 0 replies; 3+ messages in thread
From: Liming Gao @ 2020-03-16 15:46 UTC (permalink / raw)
  To: Laszlo Ersek, devel@edk2.groups.io
  Cc: Ard Biesheuvel, michael.kubacki@microsoft.com

I take BZ 2582. I will update the commit message and merge this change. 

Thanks
Liming
> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Thursday, March 12, 2020 3:47 PM
> To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; michael.kubacki@microsoft.com
> Subject: Re: [patch v2] OvmfPkg: Fix build failure with VS2015 tool chain
> 
> Hello Liming,
> 
> (adding Michael)
> 
> On 03/12/20 05:30, Liming Gao wrote:
> > warning C4244: '=': conversion from 'UINTN' to 'UINT32', possible loss of data
> > With this fix, OvmfIa32, OvmfX64 and OvmfIa32X64 can pass build.
> >
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Signed-off-by: Liming Gao <liming.gao@intel.com>
> > ---
> >  OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
> b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
> > index 1868c9fcaf..1f02da2503 100644
> > --- a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
> > +++ b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
> > @@ -384,7 +384,7 @@ QemuLoadKernelImage (
> >      //
> >      // Drop the terminating NUL, convert to UTF-16.
> >      //
> > -    KernelLoadedImage->LoadOptionsSize = (CommandLineSize - 1) * 2;
> > +    KernelLoadedImage->LoadOptionsSize = (UINT32) ((CommandLineSize - 1) * 2);
> >    }
> >
> >    QemuFwCfgSelectItem (QemuFwCfgItemInitrdSize);
> >
> 
> This patch seems to be fixing the pre-existent TianoCore ticket
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=2582
> 
> Can you please coordinate with Michael?
> 
> BTW, I prefer this patch to the one that Michael attached to the ticket
> in <https://bugzilla.tianocore.org/show_bug.cgi?id=2582#c3>.
> 
> So my suggestion is for Liming to reassign the BZ to himself please,
> reference the BZ in the commit message, and then merge this patch.
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
> Thanks,
> Laszlo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-16 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-12  4:30 [patch v2] OvmfPkg: Fix build failure with VS2015 tool chain Liming Gao
2020-03-12  7:46 ` Laszlo Ersek
2020-03-16 15:46   ` Liming Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox