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

Debugging type error for ndn-riot/encoding/data.c during flashing #10

Open
Burdaa opened this issue Apr 11, 2018 · 1 comment
Open

Debugging type error for ndn-riot/encoding/data.c during flashing #10

Burdaa opened this issue Apr 11, 2018 · 1 comment

Comments

@Burdaa
Copy link

Burdaa commented Apr 11, 2018

Errors while flashing Zolertia Re-Mote (remote-reva). Fixed by changing all afflicted lines from (%u) to (%" PRIu32"). Is this correct, or is it a bug on my part?
Ubuntu 16.04
Zolertia Re-Mote

In file included from /home/martin/dev/riot/ndn-riot/encoding/data.c:21:0:
/home/martin/dev/riot/ndn-riot/encoding/data.c: In function 'ndn_data_verify_signature':
/home/martin/dev/riot/ndn-riot/encoding/data.c:898:23: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t {aka long unsigned int}' [-Werror=format=]
                 DEBUG("ndn_encoding: invalid digest sig value length (%u)\n",
                       ^
/home/martin/dev/riot/RIOT/core/include/debug.h:56:20: note: in definition of macro 'DEBUG_PRINT'
             printf(__VA_ARGS__); \
                    ^~~~~~~~~~~
/home/martin/dev/riot/ndn-riot/encoding/data.c:898:17: note: in expansion of macro 'DEBUG'
                 DEBUG("ndn_encoding: invalid digest sig value length (%u)\n",
                 ^~~~~
/home/martin/dev/riot/ndn-riot/encoding/data.c:915:23: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t {aka long unsigned int}' [-Werror=format=]
                 DEBUG("ndn_encoding: invalid hmac sig value length (%u)\n",
                       ^
/home/martin/dev/riot/RIOT/core/include/debug.h:56:20: note: in definition of macro 'DEBUG_PRINT'
             printf(__VA_ARGS__); \
                    ^~~~~~~~~~~
/home/martin/dev/riot/ndn-riot/encoding/data.c:915:17: note: in expansion of macro 'DEBUG'
                 DEBUG("ndn_encoding: invalid hmac sig value length (%u)\n",
                 ^~~~~
/home/martin/dev/riot/ndn-riot/encoding/data.c:937:23: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t {aka long unsigned int}' [-Werror=format=]
                 DEBUG("ndn_encoding: invalid ecdsa sig value length (%u)\n",
                       ^
/home/martin/dev/riot/RIOT/core/include/debug.h:56:20: note: in definition of macro 'DEBUG_PRINT'
             printf(__VA_ARGS__); \
                    ^~~~~~~~~~~
/home/martin/dev/riot/ndn-riot/encoding/data.c:937:17: note: in expansion of macro 'DEBUG'
                 DEBUG("ndn_encoding: invalid ecdsa sig value length (%u)\n",
                 ^~~~~
/home/martin/dev/riot/ndn-riot/encoding/data.c: In function 'ndn_data_decrypt_with_ccm':
/home/martin/dev/riot/ndn-riot/encoding/data.c:1007:15: error: format '%d' expects argument of type 'int', but argument 2 has type 'int32_t {aka long int}' [-Werror=format=]
         DEBUG("ndn_encoding: wrong content type %d for ccm data\n",
               ^
               metainfo.content_type);
               ~~~~~~~~~~
/home/martin/dev/riot/RIOT/core/include/debug.h:56:20: note: in definition of macro 'DEBUG_PRINT'
             printf(__VA_ARGS__); \
                    ^~~~~~~~~~~
/home/martin/dev/riot/ndn-riot/encoding/data.c:1007:9: note: in expansion of macro 'DEBUG'
         DEBUG("ndn_encoding: wrong content type %d for ccm data\n",
         ^~~~~
cc1: all warnings being treated as errors

@astralien3000
Copy link
Contributor

You are correct, PR #12 should fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants