-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
sys/net/uhcp: remove unused returned value in uhcp_client #12588
Conversation
Better just return immediately if Also line 47 should be |
@@ -37,7 +37,7 @@ void uhcp_client(uhcp_iface_t iface) | |||
req.prefix_len = 64; | |||
|
|||
/* create listening socket */ | |||
int res = sock_udp_create(&sock, &local, NULL, 0); | |||
sock_udp_create(&sock, &local, NULL, 0); |
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 should be handled...
4e8895f
to
a939981
Compare
Ok, I changed this PR to take into account the return code and return immediately with an error message. |
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.
Now the error is handled properly.
Contribution description
This PR is an obvious fix removing a return value set in a variable that is never used afterward.
The ideal fix would be to take into account the return code in case of an error but that would need an API change in uhcp.
Testing procedure
Run
TOOLCHAIN=llvm make -C examples/gnrc_border_router/ scan-build
With this PR the warning related to uhcp is gone.
Issues/PRs references
Tick another item in #11852