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

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
Labels

Comments

@MartinBP
Copy link

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
Copy link
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
Copy link

ARM Internal Ref: IOTSSL-1772

gelldur added a commit to gelldur/mbedtls that referenced this issue Jul 11, 2018
`ret` is used always at line 1305 in statement:
`if( ( ret = pk_parse_key_pkcs8_unencrypted_der( pk, key, keylen ) ) == 0 )`
@gelldur
Copy link
Contributor

gelldur commented Jul 11, 2018

Not important but done ;)

gelldur added a commit to gelldur/mbedtls that referenced this issue Jul 20, 2018
simonbutcher added a commit to gelldur/mbedtls that referenced this issue Jul 24, 2018
simonbutcher added a commit to gelldur/mbedtls that referenced this issue Jul 24, 2018
@simonbutcher
Copy link
Contributor

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
Labels
Projects
None yet
Development

No branches or pull requests

5 participants