Skip to content
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/nanocoap: fix dead assignment in nanocoap server #12583

Merged
merged 1 commit into from
Oct 27, 2019

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Oct 27, 2019

Contribution description

This PR is fixing a warning raised by LLVM scan-build when building the nanocoap_server example. The fix simply consists in removing an assignment to a variable (res) that is unused after.

Testing procedure

Run TOOLCHAIN=llvm make -C examples/nanocoap_server/ scan-build

On master it reports a dead assignment on this nanocoap_server.c. With this pr it's fixed.

Issues/PRs references

Tick one item in #11852

@aabadie aabadie added Area: network Area: Networking Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 27, 2019
@aabadie aabadie requested a review from kaspar030 October 27, 2019 10:59
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

res is indeed unused and there is not much you can do when sending the response fails, maybe add another DEBUG() message.
But then you'd also have to simplify that tangle of ifs.

@miri64 miri64 merged commit f5c15fc into RIOT-OS:master Oct 27, 2019
@aabadie aabadie deleted the pr/sys/nanocoap_dead_assignment branch December 6, 2019 20:35
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 13, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants