platsupport,rtc: Tweak code to suppress warning Compiler is happier if array indexing is used instead of pointer arithmetic when it is a string. Signed-off-by: Kent McLeod <kent@kry10.com>
diff --git a/libplatsupport/src/plat/pc99/rtc.c b/libplatsupport/src/plat/pc99/rtc.c index 7e02576..44b22cb 100644 --- a/libplatsupport/src/plat/pc99/rtc.c +++ b/libplatsupport/src/plat/pc99/rtc.c
@@ -20,7 +20,7 @@ static inline int current_year() { #ifdef __DATE__ - return atoi(__DATE__ + 7); + return atoi(&__DATE__[7]); #else return 2014; #endif @@ -138,6 +138,6 @@ ZF_LOGE("ACPI has no FADT header. Your BIOS is broken"); return 0; } - acpi_fadt_t *fadt = (acpi_fadt_t*)header; + acpi_fadt_t *fadt = (acpi_fadt_t *)header; return fadt->century; }