diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-12-21 12:36:56 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-21 15:55:16 +0000 |
commit | 3af6c521d9c1b195a6105169df92c0b3a8107e39 (patch) | |
tree | edb1f8aef194fed28c93b6929be64f7888343c6d /ArmPlatformPkg/Library | |
parent | 3ce3274a5ea41134fafb983c0198de89007d471e (diff) | |
download | edk2-3af6c521d9c1b195a6105169df92c0b3a8107e39.tar.gz edk2-3af6c521d9c1b195a6105169df92c0b3a8107e39.tar.bz2 edk2-3af6c521d9c1b195a6105169df92c0b3a8107e39.zip |
ArmPlatformPkg/PL031RealTimeClockLib: cast EfiTimeToEpoch() val. to UINT32
In preparation for changing EfiTimeToEpoch()'s return type to UINTN, cast
EfiTimeToEpoch()'s retval to UINT32 explicitly, in LibSetTime().
Currently, this is a no-op, and even after widening the retval, it will
make no difference, as LibSetTime() explicitly restricts Time->Year under
2106, given that "the PL031 is a 32-bit counter counting seconds". The
patch is made for preventing compiler warnings.
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201221113657.6779-2-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'ArmPlatformPkg/Library')
-rw-r--r-- | ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c index 0df4ceb1cb..3afef4bf9a 100644 --- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c +++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c @@ -200,7 +200,7 @@ LibSetTime ( }
}
- EpochSeconds = EfiTimeToEpoch (Time);
+ EpochSeconds = (UINT32)EfiTimeToEpoch (Time);
// Adjust for the correct time zone, i.e. convert to UTC time zone
// The timezone setting also reflects the DST setting of the clock
|