Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Gao, Liming
Got it. Thanks for your clarification. >-Original Message- >From: Wu, Hao A >Sent: Wednesday, January 25, 2017 2:17 PM >To: Gao, Liming <liming@intel.com> >Cc: edk2-de...@ml01.01.org >Subject: RE: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expressio

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Wu, Hao A
> -Original Message- > From: Gao, Liming > Sent: Wednesday, January 25, 2017 1:58 PM > To: Wu, Hao A; Laszlo Ersek > Cc: edk2-de...@ml01.01.org > Subject: RE: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to > bigger size > > Hao: > Fo

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Gao, Liming
, >Hao A >Sent: Wednesday, January 25, 2017 8:26 AM >To: Laszlo Ersek <ler...@redhat.com> >Cc: edk2-de...@ml01.01.org >Subject: Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result >to bigger size > >> -Original Message- >> From: Laszlo Erse

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Wu, Hao A
> -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Tuesday, January 24, 2017 5:54 PM > To: Wu, Hao A > Cc: edk2-de...@ml01.01.org > Subject: Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to > bigger size > > On 0

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Laszlo Ersek
On 01/24/17 08:25, Hao Wu wrote: > There are cases that the operands of an expression are all with rank less > than UINT64/INT64 and the result of the expression is explicitly casted to > UINT64/INT64 to fit the target size. > > An example will be: > UINT32 a,b; > // a and b can be any unsigned

[edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-23 Thread Hao Wu
There are cases that the operands of an expression are all with rank less than UINT64/INT64 and the result of the expression is explicitly casted to UINT64/INT64 to fit the target size. An example will be: UINT32 a,b; // a and b can be any unsigned int type with rank less than UINT64, like //