From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C2FAC210FCF4F for ; Thu, 23 Aug 2018 02:51:34 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2018 02:51:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,278,1531810800"; d="scan'208";a="85740693" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.8]) by orsmga002.jf.intel.com with ESMTP; 23 Aug 2018 02:51:33 -0700 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Andrdw Fish , Hao A Wu Date: Thu, 23 Aug 2018 17:52:04 +0800 Message-Id: <20180823095215.274248-2-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180823095215.274248-1-ruiyu.ni@intel.com> References: <20180823095215.274248-1-ruiyu.ni@intel.com> Subject: [PATCH 01/12] EmulatorPkg/ThunkProtocolList: Fix VS build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2018 09:51:35 -0000 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 Cc: Andrdw Fish Cc: Hao A Wu --- 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.
- Copyright (c) 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
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