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

Cleanup & warning fixes under MinGW64 #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

svaningelgem
Copy link

  • removal of whitespaces at the end of a line.
  • indentation (little bit)

Fix for warnings under MinGW64:

  • the socket (DWORD) was compare to -1, should be vs INVALID_SOCKET
  • a few of the parameters of the pthread-wrapper weren't used, mark them as unused so there ain't no warnings.
  • SIGPIPEHandler was not used, and as it was a static, it spawned a warning about an unused function
  • return type for connectionHandlerThread was a NULL casted, should be a 0
  • conversion from GetLastError to %d caused a warning. Now bring it first to a DWORD always to mitigate the warning.

- removal of whitespaces at the end of a line.
- indentation (little bit)

Fix for warnings under MinGW64:
- the socket (DWORD) was compare to -1, should be vs INVALID_SOCKET
- a few of the parameters of the pthread-wrapper weren't used, mark them as unused so there ain't no warnings.
- SIGPIPEHandler was not used, and as it was a static, it spawned a warning about an unused function
- return type for connectionHandlerThread was a NULL casted, should be a 0
- conversion from GetLastError to %d caused a warning. Now bring it first to a DWORD always to mitigate the warning.
@svaningelgem
Copy link
Author

One "big" todo here would be to interpret the WSAGetLastError better as the values are quite different between POSIX & Windows systems.

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.

1 participant