Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix : Wrong _tcp_client[] array initialization #62

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

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

ABOSTM
Copy link
Contributor

@ABOSTM ABOSTM commented Apr 13, 2022

Fix : Wrong _tcp_client[] array initialization

Former "_tcp_client[MAX_CLIENT] = {};" tries to initialize
the array element with index MAX_CLIENT,
which is out of array range [0 .. (MAX_CLIENT-1)]
Fixes warning:
warning: array subscript 32 is above array bounds of 'tcp_struct* [32]' [-Warray-bounds]

Instead initialize each element of the array one by one.

Signed-off-by: Alexandre Bourdiol alexandre.bourdiol@st.com

@ABOSTM ABOSTM requested a review from fpistm April 13, 2022 08:37
@ABOSTM ABOSTM added the bug label Apr 13, 2022
Former "_tcp_client[MAX_CLIENT] = {};" tries to initialize
the array element with index MAX_CLIENT,
which is out of array range [0 .. (MAX_CLIENT-1)]
Fixes warning:
warning: array subscript 32 is above array bounds of 'tcp_struct* [32]'
[-Warray-bounds]

Instead initialize each element of the array one by one.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
@ABOSTM ABOSTM force-pushed the ARRAY_INITIALIZATION branch from ce058cd to 0384dd2 Compare April 13, 2022 09:14
@fpistm fpistm merged commit fb56c54 into stm32duino:main Apr 13, 2022
@fpistm fpistm added the fix 🩹 Bug fix label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 🩹 Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.