-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix compilation warnings from GCC in netsocket/network tests #11473
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
Conversation
@michalpasztamobica, thank you for your changes. |
TESTS/network/wifi/main.cpp
Outdated
!defined(MBED_CONF_APP_WIFI_CH_UNSECURE) || \ | ||
!defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) | ||
#endif // defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) && | ||
// !defined(MBED_CONF_APP_AP_MAC_UNSECURE) || |
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.
shouldn't these be removed?
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.
@0xc0170 , I don't think so. This is the closing #endif
for the #define
from lines 41-45. I think it makes sense to leave it as close as possible to the opening one.
What we can do is decrease the number of lines, by putting multiple checks into one line, but this will decrease readability...
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.
The warning that I am addressing here is that the "comment was multiline". The compiler interprets the "" at the end of the line as a continuation of the comment, rather than a continuation of a macro. After we remove the ""s we need to add the new comment indicators at the beginning of each line.
An example of what causes a warning:
// comment line 1 \
comment line 2 \
comment line 3
Instead we need to go:
// comment line 1
// comment line 2
// comment line 3
TESTS/network/emac/main.cpp
Outdated
!defined(TARGET_MTB_UBLOX_ODIN_W2) && \ | ||
!defined(TARGET_UNO_91H) | ||
#endif // (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI) && | ||
// !defined(TARGET_UBLOX_EVK_ODIN_W2) && |
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.
also these not removed?
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.
This is acceptable, but quite ugly.. maybe just #endif // INTERFACE==WIFI && TARGET_*
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.
Good, idea. I amended the commit to follow this.
1680959
to
9ce69b6
Compare
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.
Looks better now.
CI started |
Test run: SUCCESSSummary: 4 of 4 test jobs passed |
Description
Four kinds of warnings were occurring:
\
at the end of a comment line renders this)Warnings only occurred in the test code.
Pull request type
Reviewers
@AnttiKauppila
@VeijoPesonen
@SeppoTakalo