Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86_silk_map.c:63:3: Excess elements in array initializer #50

Closed
GregSlazinski opened this issue Jun 24, 2017 · 1 comment
Closed

x86_silk_map.c:63:3: Excess elements in array initializer #50

GregSlazinski opened this issue Jun 24, 2017 · 1 comment

Comments

@GregSlazinski
Copy link

Trying to compile on Mac after updating to latest version I get this error:

silk/x86/x86_silk_map.c:63:3: Excess elements in array initializer

opus_int (*const SILK_VAD_GETSA_Q8_IMPL[ OPUS_ARCHMASK + 1 ] )(
    silk_encoder_state *psEncC,
    const opus_int16   pIn[]
) = {
  silk_VAD_GetSA_Q8_c,                  /* non-sse */
  silk_VAD_GetSA_Q8_c,
  silk_VAD_GetSA_Q8_c,
  MAY_HAVE_SSE4_1( silk_VAD_GetSA_Q8 ), /* sse4.1 */
  MAY_HAVE_SSE4_1( silk_VAD_GetSA_Q8 )  /* avx */
};

Because OPUS_ARCHMASK appears to be 0.
I took a look at cpu_support.h and indeed it's possible it's set to 0.

So it looks like your initializer list is unsafe, because it ignores checks for OPUS_ARCHMASK

@jmvalin
Copy link
Member

jmvalin commented Oct 8, 2017

What build system are you using? It seems like silk/x86/x86_silk_map.c shouldn't be built if the conditions for setting OPUS_ARCHMASK to 7 (x86) aren't met.

@jmvalin jmvalin closed this as completed Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants