OK, I will do it and sent out a patch series for these two fixes.

Best Regards,
Hao Wu

> -----Original Message-----
> From: Zeng, Star
> Sent: Friday, January 08, 2016 10:17 AM
> To: Wu, Hao A; [email protected]; Kinney, Michael D; Gao, Liming; Tian,
> Feng; Yao, Jiewen
> Subject: Re: [edk2] [PATCH] MdeModulePkg BaseSerialPortLib: Fix VS2010
> build error
> 
> Hao,
> 
> Could you also do the similar fix for
> PcAtChipsetPkg/Library/SerialIoLib/SerialPortLib.c?
> 
> Thanks,
> Star
> 
> On 2016/1/7 12:40, Hao Wu wrote:
> > When overriding compiler options '/GL' with '/GL-', VS2010 will report
> > warning C4701 potentially uninitialized local variable for 'LcrParity'
> > and 'LcrStop' in function SerialPortSetAttributes().
> >
> > This commit fixes this build issue.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Hao Wu <[email protected]>
> > ---
> >   .../Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c    | 10 
> > ++-------
> -
> >   1 file changed, 2 insertions(+), 8 deletions(-)
> >
> > diff --git
> a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
> b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
> > index f4fc319..ede3544 100644
> > ---
> a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
> > +++
> b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
> > @@ -1006,9 +1006,6 @@ SerialPortSetAttributes (
> >           break;
> >       }
> >     } else {
> > -    if ((*Parity < NoParity) || (*Parity > SpaceParity)) {
> > -      return RETURN_INVALID_PARAMETER;
> > -    }
> >       switch (*Parity) {
> >         case NoParity:
> >           LcrParity = 0;
> > @@ -1031,7 +1028,7 @@ SerialPortSetAttributes (
> >           break;
> >
> >         default:
> > -        break;
> > +        return RETURN_INVALID_PARAMETER;
> >       }
> >     }
> >
> > @@ -1054,9 +1051,6 @@ SerialPortSetAttributes (
> >           break;
> >       }
> >     } else {
> > -    if ((*StopBits < OneStopBit) || (*StopBits > TwoStopBits)) {
> > -      return RETURN_INVALID_PARAMETER;
> > -    }
> >       switch (*StopBits) {
> >         case OneStopBit:
> >           LcrStop = 0;
> > @@ -1068,7 +1062,7 @@ SerialPortSetAttributes (
> >           break;
> >
> >         default:
> > -        break;
> > +        return RETURN_INVALID_PARAMETER;
> >       }
> >     }
> >
> >

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to