mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
fix(s32g274a): avoid overwriting const fields
This corrects the following Coverity issue: CID 425810: High impact quality (WRITE_CONST_FIELD). A write to an aggregate overwrites a const-qualified field within the aggregate. (void)memset(&s32g2_console, 0, sizeof(s32g2_console)); Change-Id: Idc332be2c4dbf4858d2e9be0b41d5eba86587258 Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
This commit is contained in:
parent
23fc05a33d
commit
bf012960d4
1 changed files with 4 additions and 3 deletions
|
@ -11,11 +11,12 @@
|
|||
|
||||
void console_s32g2_register(void)
|
||||
{
|
||||
static console_t s32g2_console;
|
||||
static console_t s32g2_console = {
|
||||
.next = NULL,
|
||||
.flags = 0u,
|
||||
};
|
||||
int ret;
|
||||
|
||||
(void)memset(&s32g2_console, 0, sizeof(s32g2_console));
|
||||
|
||||
ret = console_linflex_register(UART_BASE, UART_CLOCK_HZ,
|
||||
UART_BAUDRATE, &s32g2_console);
|
||||
if (ret == 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue