mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Fix some warnings produced by different compilers. (#5593)
This commit is contained in:
parent
5bb0005f9f
commit
bfe4fd5f2e
6 changed files with 19 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue