summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-02-09 15:31:26 (GMT)
committerGitHub <noreply@github.com>2018-02-09 15:31:26 (GMT)
commitbfe4fd5f2e96e72eecb5b8a0c7df0ac1689f3b7e (patch)
treeb0bdd00da587355830e8b18fbadc72054ae0ad0c /Modules/socketmodule.c
parent5bb0005f9ff768ac443924b4bb26c3818ce8dc5a (diff)
downloadcpython-bfe4fd5f2e96e72eecb5b8a0c7df0ac1689f3b7e.zip
cpython-bfe4fd5f2e96e72eecb5b8a0c7df0ac1689f3b7e.tar.gz
cpython-bfe4fd5f2e96e72eecb5b8a0c7df0ac1689f3b7e.tar.bz2
Fix some warnings produced by different compilers. (#5593)
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 13936aa..23061be 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4867,7 +4867,9 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwds)
if (type == -1) {
int tmp;
socklen_t slen = sizeof(tmp);
- if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &tmp, &slen) == 0) {
+ if (getsockopt(fd, SOL_SOCKET, SO_TYPE,
+ (void *)&tmp, &slen) == 0)
+ {
type = tmp;
} else {
#ifdef MS_WINDOWS
@@ -4885,7 +4887,9 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwds)
if (proto == -1) {
int tmp;
socklen_t slen = sizeof(tmp);
- if (getsockopt(fd, SOL_SOCKET, SO_PROTOCOL, &tmp, &slen) == 0) {
+ if (getsockopt(fd, SOL_SOCKET, SO_PROTOCOL,
+ (void *)&tmp, &slen) == 0)
+ {
proto = tmp;
} else {
#ifdef MS_WINDOWS