mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-23 07:21:16 +02:00
Merge pull request #1058 from alistair23/alistair/master
psci_common: Resolve GCC static analysis false positive
This commit is contained in:
commit
c1f814660f
@ -194,8 +194,15 @@ static void psci_set_req_local_pwr_state(unsigned int pwrlvl,
|
||||
unsigned int cpu_idx,
|
||||
plat_local_state_t req_pwr_state)
|
||||
{
|
||||
/*
|
||||
* This should never happen, we have this here to avoid
|
||||
* "array subscript is above array bounds" errors in GCC.
|
||||
*/
|
||||
assert(pwrlvl > PSCI_CPU_PWR_LVL);
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
psci_req_local_pwr_states[pwrlvl - 1][cpu_idx] = req_pwr_state;
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user