-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 "inconsistent annotation" warnings #7531
Comments
Hi, thanks for the report. Some specific examples of the functions you describe would be really helpful. I would invite you to raise a PR against the respository which implements the fix you want to see. This would be the fastest way to close the issue. Would you have time to do this? In the meantime I will have a look and try to replicate the isue, although I am not a Windows user. Thanks |
int mbedtls_ssl_session_copy(mbedtls_ssl_session *dst, Hope it helps. |
For further information, are there any specific build options you use when these warnings appear or is it a case of any and all builds will have these warnings? |
Probably it was this one: https://learn.microsoft.com/en-us/cpp/code-quality/c28252?view=msvc-170 |
Sorry I mean are you passing any specific build options etc to the compiler that trigger the warnings? Or are you jsut building with everything default and seeing them? e: I didn't realise you had to manually enable some warnings in VS, now I get why you sent the link. Thanks for that. |
Just to update: We have tried to replicate these warnings on VS 2022 but have as yet been unable to do so, so we are going to need more information about the steps needed to reproduce the issue. Please may we have your full reproduction steps, including things like retarget options, system evironment etc. The mbedtls version you are using would be good too. The more you can tell us the better. Thanks |
We have now verified the existence of these warnings. Fixing this would be an improvement but it is not something we can prioritise at present. We would welcome a PR from the community for this. Also, it should be noted that the full fix for this would include having something in the CI to recreate the VS build that shows these warnings. |
Suggested enhancement
All functions declared as
MBEDTLS_CHECK_RETURN_CRITICAL
should have this annotation in definitions.Justification
Currently some functions are declared in
ssl_misc.h
and defined inssl_tls.c
withMBEDTLS_CHECK_RETURN_CRITICAL
annotation.For unknown reason there are definitions with omitted annotation, and this gives warnings in VS 2022.
The warning is minor, but for consistency and quiet compilation this should be amended.
The text was updated successfully, but these errors were encountered: