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

Remove uint64_t format specifier warnings #216

Merged
merged 1 commit into from Mar 1, 2014
Merged

Conversation

blutack
Copy link
Contributor

@blutack blutack commented Feb 13, 2014

There are format build warnings present with GCC 4.8.1 on Linux.

src/core/global.c: In function ‘nn_global_submit_counter’:
src/core/global.c:904:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat=]
             s->socket_name, name, value);
             ^
src/core/global.c:919:17: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘uint64_t’ [-Wformat=]
                 timebuf, value);
                 ^
src/core/global.c:923:17: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘uint64_t’ [-Wformat=]
                 timebuf, value);
                 ^

This patch explicitly casts 'value' to match the format specifier, and results in a clean build.

Explicitly cast to long long unsigned int to remove build warnings.
@tailhook
Copy link
Member

tailhook commented Mar 1, 2014

Patch seems ok. Can you state that the patch is submitted under MIT license?

@tailhook
Copy link
Member

tailhook commented Mar 1, 2014

Also what name should I add to the AUTHORS file?

@blutack
Copy link
Contributor Author

blutack commented Mar 1, 2014

I hereby state that this patch is submitted under the MIT license.
If it's worth adding to AUTHORS for such a trivial fix, could you pop it under Gareth Roberts, blutack at gmail please?

tailhook added a commit that referenced this pull request Mar 1, 2014
Remove uint64_t format specifier warnings
@tailhook tailhook merged commit a3eecd8 into nanomsg:master Mar 1, 2014
@tailhook
Copy link
Member

tailhook commented Mar 1, 2014

Applied. Thanks!

@blutack
Copy link
Contributor Author

blutack commented Mar 1, 2014

You're welcome. Nanomsg is fantastic.

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

Successfully merging this pull request may close these issues.

None yet

2 participants