-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Removes warnings about using deprecated inet function #10698
Removes warnings about using deprecated inet function #10698
Conversation
Well, this function is really problematic unless it stores its result in thread-local storage (it probably doesn't) |
I would have imagined that if this caused issues, it would have already. If you would prefer, I'll just replace all uses of inet_ntoa to a safer function. |
Replacing them should be safer. Alternatively, it could be implemented as a formatting function specialization for |
The warning in question is: "Warning C4996 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS" Simply adding the _WINSOCK_DEPRECATED_NO_WARNINGS preprocessor silences the warnings.
This reverts commit 4574ef9.
4574ef9
to
3c37023
Compare
Updated PR by removing the first commit and replacing all uses of inet_ntoa with inet_ntop. |
Upon further reflection, it seems this code is called rarely enough that we could justify having a helper function that returns an Open to feedback here. |
I mean that function already exists in the code, it's ip_to_string. |
I assumed that we were passing the format string + data to a printf family function. I did not know that rpcs3 had an implementation of format string generation. While I agree having a format specifier that takes a |
The warning in question is: "Warning C4996 'inet_ntoa': Use
inet_ntop() or InetNtop() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS"
Simply adding the _WINSOCK_DEPRECATED_NO_WARNINGS preprocessor silences
the warnings.