QuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Fix GCC build issues
https://bugzilla.tianocore.org/show_bug.cgi?id=335 Fix build issues with GCC49. There are local variables that may be used before initialized in some paths. Cc: Kelly Steele <kelly.steele@intel.com> Cc: Lee Leahy <leroy.p.leahy@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
This commit is contained in:
parent
39dfd12de4
commit
df3f02df1b
|
@ -59,6 +59,8 @@ WriteTpmBufferMultiple (
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN PartialLength;
|
UINTN PartialLength;
|
||||||
|
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
I2CDeviceAddr.I2CDeviceAddress = ATMEL_I2C_TPM_SLAVE_ADDRESS;
|
I2CDeviceAddr.I2CDeviceAddress = ATMEL_I2C_TPM_SLAVE_ADDRESS;
|
||||||
|
|
||||||
DEBUG ((EFI_D_VERBOSE, "WriteTpmBufferMultiple: Addr=%02x Length=%02x\n", I2CDeviceAddr.I2CDeviceAddress, Length));
|
DEBUG ((EFI_D_VERBOSE, "WriteTpmBufferMultiple: Addr=%02x Length=%02x\n", I2CDeviceAddr.I2CDeviceAddress, Length));
|
||||||
|
@ -112,6 +114,8 @@ ReadTpmBufferMultiple (
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN PartialLength;
|
UINTN PartialLength;
|
||||||
|
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
I2CDeviceAddr.I2CDeviceAddress = ATMEL_I2C_TPM_SLAVE_ADDRESS;
|
I2CDeviceAddr.I2CDeviceAddress = ATMEL_I2C_TPM_SLAVE_ADDRESS;
|
||||||
WriteLength = 0;
|
WriteLength = 0;
|
||||||
|
|
||||||
|
@ -262,6 +266,13 @@ Tpm12SubmitCommand (
|
||||||
INT64 Cycle;
|
INT64 Cycle;
|
||||||
INT64 Delta;
|
INT64 Delta;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Initialize local variables
|
||||||
|
//
|
||||||
|
Start = 0;
|
||||||
|
End = 0;
|
||||||
|
Total = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make sure response buffer is big enough to hold a response header
|
// Make sure response buffer is big enough to hold a response header
|
||||||
//
|
//
|
||||||
|
@ -275,13 +286,6 @@ Tpm12SubmitCommand (
|
||||||
//
|
//
|
||||||
Current = GetPerformanceCounter();
|
Current = GetPerformanceCounter();
|
||||||
|
|
||||||
//
|
|
||||||
// Initialize local variables
|
|
||||||
//
|
|
||||||
Start = 0;
|
|
||||||
End = 0;
|
|
||||||
Total = 0;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Retrieve the performance counter properties and compute the number of
|
// Retrieve the performance counter properties and compute the number of
|
||||||
// performance counter ticks required to reach the maximum TIS timeout of
|
// performance counter ticks required to reach the maximum TIS timeout of
|
||||||
|
|
Loading…
Reference in New Issue