mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
PcAtChipsetPkg SerialIoLib: Fix VS2010 build error
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 <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19629 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4977ee965f
commit
de3ecb331f
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
UART Serial Port library functions
|
UART Serial Port library functions
|
||||||
|
|
||||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -417,14 +417,6 @@ SerialPortSetAttributes (
|
|||||||
return RETURN_INVALID_PARAMETER;
|
return RETURN_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*Parity < NoParity) || (*Parity > SpaceParity)) {
|
|
||||||
return RETURN_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((*StopBits < OneStopBit) || (*StopBits > TwoStopBits)) {
|
|
||||||
return RETURN_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Map 5..8 to 0..3
|
// Map 5..8 to 0..3
|
||||||
//
|
//
|
||||||
@ -452,7 +444,7 @@ SerialPortSetAttributes (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
return RETURN_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (*StopBits) {
|
switch (*StopBits) {
|
||||||
@ -466,7 +458,7 @@ SerialPortSetAttributes (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
return RETURN_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user