From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.groups.io with SMTP id smtpd.web12.27464.1585489869880741353 for ; Sun, 29 Mar 2020 06:51:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=JOpkafoh; spf=pass (domain: linaro.org, ip: 209.85.221.65, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f65.google.com with SMTP id d5so17768186wrn.2 for ; Sun, 29 Mar 2020 06:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=s002YfBRLlS32dt8R1Y6VXz73PYkrfWT/F6Oh/CzTZE=; b=JOpkafohtlvm5pnz2BhT11dl88gXkaOkF+jIqn/gkLtLgHBKYKeaAX7jq+/lDHkPnB dY/ZQcJzHV1r+hkuR7HMCkvk1WmBF4jLkX0Rl3Ao3Ye5AnyUUQS4dJ4WU9QTAruZNB6W R0xHPeEV2CYPmvSgiSLq6tWWDqcG8zlNsKtICGV6pnzY9rc2NurG2qY19NU8S+wMh1Ik qtQAfKRG13SlSPfRLjEdXzRNcH4IysQ4XGe6MZVWf7z1GL6pboYLhhmtV4EWI7NLozZ4 6yhDT3Y+jpzTMXVEHoPIhOtBt9SpdzoubLiww7juuYiW5Eybw03ij01iqq9wpU/49L99 DyEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=s002YfBRLlS32dt8R1Y6VXz73PYkrfWT/F6Oh/CzTZE=; b=Nfut3MM+3eRlesCJBUcbjrWw8yhCagB4jhuzfnJNPqP08rBpt5Vk6VDN1T3sU9xnzK sXVSESxu95yj7Qrxu29D92T+wFXScNX9KK+k8hGCV2bykXlj4aKQ3QJAVzpBX4mgmSFB dMMr8YJ1PYF7vjKb/wcepQz7Kpgybf/v8WSG3ZBio5/x2eDwxoWygwj+kWcp1wIzmbz7 DPa8FvQUkcty9rRoj2hh0xFalJJVI8b+LcWRG/GhfT/KpOSg6U3ZqXYDV3dW5/T+mlBk TU2NyxmLgO/N2646DUBEwWAeqdgsKU7CFIZGrjl6X1nEPkBDLcgJ/zqb4FG619jFCpJ7 U7zQ== X-Gm-Message-State: ANhLgQ2Tx4nid+DPlM9bxyxjHc8A1kTYF3Ppo8uFZNcCitsezRczUEpH 7e7TlwqsQ1oC1l3qKFnz9lURYHLJO+1oXQ== X-Google-Smtp-Source: ADFU+vurHWaD6RKvS4ld9ufvWXTllYrCEiRHJUuNhxHC/I7PQ/ajhnEw0gb46P+EE5jRMz2+CDjXyg== X-Received: by 2002:a5d:5230:: with SMTP id i16mr9822454wra.15.1585489868296; Sun, 29 Mar 2020 06:51:08 -0700 (PDT) Return-Path: Received: from e123331-lin.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr. [109.210.65.247]) by smtp.gmail.com with ESMTPSA id r17sm17434216wrx.46.2020.03.29.06.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Mar 2020 06:51:07 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: lersek@redhat.com, Ard Biesheuvel Subject: [PATCH] OvmfPkg/GenericQemuLoadImageLib: Fix VS2019 UINT32 conversion error Date: Sun, 29 Mar 2020 15:51:04 +0200 Message-Id: <20200329135104.6560-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 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 --- 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); -- 2.17.1