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

Compiler warning, variable 'ret' is used before its value is set in mbedtls_pk_parse_key #1098

Closed
MartinBP opened this Issue Sep 22, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@MartinBP

MartinBP commented Sep 22, 2017

The variable 'ret' in mbedtls_pk_parse_key is casted to void in line 1184 before it has been assigned a value when just MBEDTLS_ECP_C of the preprocessor symbols in that function is defined.

ret is always assigned a value in line 1211, so it looks like only pwd and pwdlen needs to be casted to void to avoid warnings about variables not referenced.

@RonEld

This comment has been minimized.

Contributor

RonEld commented Sep 24, 2017

Hi @MartinBP Thank you for reporting this!
I hope you agree this is not a high priority issue though

@ciarmcom

This comment has been minimized.

Member

ciarmcom commented Sep 24, 2017

ARM Internal Ref: IOTSSL-1772

@ciarmcom ciarmcom added the mirrored label Sep 24, 2017

gelldur added a commit to gelldur/mbedtls that referenced this issue Jul 11, 2018

Remove unnecessary mark as unused ARMmbed#1098
`ret` is used always at line 1305 in statement:
`if( ( ret = pk_parse_key_pkcs8_unencrypted_der( pk, key, keylen ) ) == 0 )`
@gelldur

This comment has been minimized.

Contributor

gelldur commented Jul 11, 2018

Not important but done ;)

gelldur added a commit to gelldur/mbedtls that referenced this issue Jul 20, 2018

sbutcher-arm added a commit to gelldur/mbedtls that referenced this issue Jul 24, 2018

sbutcher-arm added a commit to gelldur/mbedtls that referenced this issue Jul 24, 2018

@sbutcher-arm

This comment has been minimized.

Collaborator

sbutcher-arm commented Jul 24, 2018

PR #1854 has now been merged which should fix this issue. Therefore it can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment