Skip to content
Commit 0c30db1e authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

subsys/pm: C99-legalize declaration of CPU power states



The CPU power states were declared with a typecast array literal,
which is a GNU extension.

Unfortunately some compilers (xt-xcc even in very recent versions,
when used with -fdata-sections) will die with a compiler error when
those rvalues are used in an expression that also takes their address,
e.g.:

    /* this all by itself crashes xcc -fdata-sections */
    int *foo = (int[]){0};

Declare the array elments in two steps, making the code standard C.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent f7cdea85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment