Skip to content

Fixed signed/unsigned comparison warning. #4

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

Merged
merged 1 commit into from
Mar 14, 2017

Conversation

cesfahani
Copy link
Contributor

Compiling with gcc -Wall caused a warning indicating a comparison between signed and unsigned integer expressions. This is because size_t is unsigned on most platforms, and the socket_write function's size argument was defaulted to -1 (and was then being compared to -1 to check for a defaulted value).
Instead, now we simply overload the socket_write method to have a version with and without the size argument.

@yhirose yhirose merged commit 2c276ed into yhirose:master Mar 14, 2017
@yhirose
Copy link
Owner

yhirose commented Mar 14, 2017

@cesfahani, thanks for the fix!

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.

2 participants