public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Andrdw Fish <afish@apple.com>, Hao A Wu <hao.a.wu@intel.com>
Subject: [PATCH v2 01/12] EmulatorPkg/ThunkProtocolList: Fix VS build failure
Date: Thu, 23 Aug 2018 17:56:09 +0800	[thread overview]
Message-ID: <20180823095620.280996-2-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20180823095620.280996-1-ruiyu.ni@intel.com>

VS compiler complains converting UINTN to UINT16 causes data lost.
Add typecast to fix the build failure.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Andrdw Fish <afish@apple.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
---
 EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c b/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c
index b2daa2bef5..9fa9e25e94 100644
--- a/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c
+++ b/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.c
@@ -2,7 +2,7 @@
   Emulator Thunk to abstract OS services from pure EFI code
 
   Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
-  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
@@ -82,7 +82,7 @@ AddThunkProtocol (
     Private->EmuBusDriver       = EmuBusDriver;
 
     CopyMem (&Private->Data, ThunkIo, sizeof (EMU_IO_THUNK_PROTOCOL));
-    Private->Data.Instance      = Instance++;
+    Private->Data.Instance      = (UINT16)Instance++;
     Private->Data.ConfigString  = StartString;
 
     InsertTailList (&mThunkList, &Private->Link);
-- 
2.16.1.windows.1



  reply	other threads:[~2018-08-23  9:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23  9:56 [PATCH v2 00/12] Add WinHost support in EmulatorPkg Ruiyu Ni
2018-08-23  9:56 ` Ruiyu Ni [this message]
2018-08-23  9:56 ` [PATCH v2 02/12] EmulatorPkg/Win: Add Windows host support Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 03/12] EmulatorPkg/Win: Enable source level debugging Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 04/12] EmulatorPkg/Win: Enable native OS console as firmware console Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 05/12] EmulatorPkg/Win: Add input/output support Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 06/12] EmulatorPkg/Win: Add timer and interrupt support Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 07/12] EmulatorPkg/Win: Add RTC support Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 08/12] EmulatorPkg/Win: Add SimpleFileSystem support Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 09/12] EmulatorPkg/Win: Add BlockIo support Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 10/12] EmulatorPkg/PlatformBds: Signal EndOfDxe in platform BDS Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 11/12] EmulatorPkg/EmuFileSystem: Fix a bug that causes Close() assertion Ruiyu Ni
2018-08-23  9:56 ` [PATCH v2 12/12] EmulatorPkg/DSC: Remove FS mapping to EDK Shell bin directory Ruiyu Ni
2018-08-23 15:24 ` [PATCH v2 00/12] Add WinHost support in EmulatorPkg Kinney, Michael D
2018-08-23 16:27   ` Ni, Ruiyu
2018-08-27  6:43 ` Wu, Hao A
2018-08-30  1:57 ` Shia, Cinnamon
2018-09-04  2:32   ` Ni, Ruiyu
2018-09-04  3:12     ` krishnaLee
2018-09-04 15:12       ` Kinney, Michael D
2018-09-04  6:17     ` Shia, Cinnamon

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=20180823095620.280996-2-ruiyu.ni@intel.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