Skip to content
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

gnrc_sixlowpan: don't use PRIx8 #11124

Merged
merged 1 commit into from
Mar 8, 2019

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Mar 7, 2019

Contribution description

With newlib nano-specs the debug output without this change will be

6lo: dispatch 0hx ... is not supported

With this PR this will provide a correct output, e.g.

6lo: dispatch 3f ... is not supported

Testing procedure

Flash two 6Lo-capable boards that utilize newlib-nano (e.g. samr21-xpro or iotlab-m3) with ENABLE_DEBUG=1 in sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c with gnrc_minimal and gnrc_networking respectively. You need to reset gnrc_minimal once you connected a terminal to get the IPv6 address. Then try without any additional configuration to ping the gnrc_minimal node from the gnrc_networking node. Without this PR you should get the line

6lo: dispatch 0hx ... is not supported

somewhere in the output, with it you will get

6lo: dispatch 7a... is not supported

Issues/PRs references

Found when I was debugging #11091 (comment).

With newlib nano-specs the debug output without this change will be

    6lo: dispatch 0hx ... is not supported

With this PR this will provide a correct output, e.g.

    6lo: dispatch 0x3f ... is not supported
@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 7, 2019
@miri64 miri64 requested review from cladmi and kaspar030 March 7, 2019 11:54
/* For PRIu16 etc. */
#include <inttypes.h>
#endif

Copy link
Member Author

Choose a reason for hiding this comment

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

This is not needed anymore so it can be removed.

Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

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

The format specified doesn't match the given type. Please cast the second argument to unsigned int.

@maribu maribu added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Mar 7, 2019
@maribu maribu added Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 3-testing The PR was tested according to the maintainer guidelines and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 8, 2019
@maribu
Copy link
Member

maribu commented Mar 8, 2019

Tested with the MSBA-2 using the PR version of cc110x. Works :-)

@maribu maribu merged commit 8dbd3b2 into RIOT-OS:master Mar 8, 2019
@miri64 miri64 deleted the gnrc_sixlowpan/fix/debug-pri branch March 8, 2019 10:43
@danpetry danpetry added this to the Release 2019.04 milestone Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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 Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants