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 compilation warnings #13894
Fix compilation warnings #13894
Conversation
@noonfom, thank you for your changes. |
@noonfom Please look at travis failures, look related |
@@ -102,10 +102,13 @@ typedef struct secure_session { | |||
} secure_session_t; | |||
|
|||
static NS_LIST_DEFINE(secure_session_list, secure_session_t, link); | |||
|
|||
#if COAP_SECURITY_AVAILABLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if COAP_SECURITY_AVAILABLE | |
#ifdef COAP_SECURITY_AVAILABLE |
and others
@@ -885,7 +885,8 @@ void connection_handler_close_secure_connection(coap_conn_handler_t *handler, ui | |||
if (handler->socket && handler->socket->is_secure) { | |||
secure_session_t *session = secure_session_find(handler->socket, destination_addr_ptr, port); | |||
if (session) { | |||
#if COAP_SECURITY_AVAILABLE | |||
#ifdef COAP_SECURITY_AVAILABLE | |||
#ifdef COAP_SECURITY_AVAILABLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. Is the coap-service compiled also with COAP_SECURITY_AVAILABLE disabled? When we are making the next update, we will first merge these changes back to the original master repository. Then changes will not be lost. |
70042b6
to
3e6cf78
Compare
Seems that way, otherwise CI wouldn't have failed when the #ifdef was mistakenly an #if and the define was missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for reducing the warnings
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Recently, a user found that compiling Mbed OS with the GCC_ARM toolchain produces several warnings that could affect program reliability (#13604). It is not possible to fix all the warnings since there are a lot of 3rd party components in the tree. However, simple solutions exist for a some of the warnings. A few are given in Mbed-TLS/mbedtls#3867; others are supplied here.
compout.txt gives the compiler output after making the changes.
mbed compile -c -m NUCLEO_F446RE -t GCC_ARM &> ../compout.txt
compout.txt
warning.txt gives the remaining warnings.
cat compout.txt | grep "Warning" > warning.txt
warning.txt
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
Reviewers
@pan-
@paul-szczepanek-arm