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

Fix 'declaration shadows a local variable' warning #1572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

popizdeh
Copy link

@popizdeh popizdeh commented Nov 3, 2023

When compiling for AVX and AVX2 code expands to
`
// stbir__4_coeff_start

stbir__simdf8 tot0,c,cs;                      \
STBIR_SIMD_NO_UNROLL(decode);                 \
stbir__simdf8_load4b( cs, hc );               \
stbir__simdf8_0123to00112233( c, cs );        \
stbir__simdf8_mult_mem( tot0, c, decode );

// stbir__store_output

{ stbir__simdf t,c;                           \
stbir__simdf8_add4halves( t, stbir__if_simdf8_cast_to_simdf4(tot0), tot0 );    \
stbir__simdf_0123to2301( c, t );              \
stbir__simdf_add( t, t, c );                  \
stbir__simdf_store2( output, t );             \
horizontal_coefficients += coefficient_width; \
++horizontal_contributors;                    \
output += 2; }`

Declaration of c in the nested scope shadows previously declared variable coming from expansion of stbir__4_coeff_start. I'm not sure what the logic is behind variable names but I'm just using the next available letter.

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

Successfully merging this pull request may close these issues.

None yet

1 participant