From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH] OvmfPkg/PvScsiDxe: Fix VS2019 build error because of implicit cast To: Liran Alon ,devel@edk2.groups.io From: "Sean" X-Originating-Location: Redmond, Washington, US (50.35.74.15) X-Originating-Platform: Windows Chrome 83 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 31 Mar 2020 08:53:20 -0700 References: <20200331110452.51992-1-liran.alon@oracle.com> In-Reply-To: <20200331110452.51992-1-liran.alon@oracle.com> Message-ID: <22866.1585670000047029434@groups.io> Content-Type: multipart/alternative; boundary="y4VOOjYt7EJE6zI8cGGI" --y4VOOjYt7EJE6zI8cGGI Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable A couple of thoughts. 1. I would suggest that ASSERT should not be the only protection for an in= valid operation as ASSERT is usually disabled on release builds. 2. We do have a library to make this more explicit and common. https://git= hub.com/tianocore/edk2/blob/master/MdePkg/Include/Library/SafeIntLib.h#L548 Thanks --y4VOOjYt7EJE6zI8cGGI Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable A couple of thoughts. 
1. I would suggest that ASSERT should not = be the only protection for an invalid operation as ASSERT is usually disabl= ed on release builds.  
2. We do have a library to make this= more explicit and common.  https://githu= b.com/tianocore/edk2/blob/master/MdePkg/Include/Library/SafeIntLib.h#L548

Thanks --y4VOOjYt7EJE6zI8cGGI--