Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d73adf

Browse files
vstinnertiran
andauthored
gh-84461: Silence some compiler warnings on WASM (GH-93978) (#94025)
(cherry picked from commit774ef28)Co-authored-by: Christian Heimes <christian@python.org>
1 parent8a1bade commit9d73adf

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

‎Modules/_io/bufferedio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ _enter_buffered_busy(buffered *self)
341341
: buffered_closed(self)))
342342

343343
#defineCHECK_CLOSED(self,error_msg) \
344-
if (IS_CLOSED(self) & (Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t) == 0)) { \
344+
if (IS_CLOSED(self) && (Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t) == 0)) { \
345345
PyErr_SetString(PyExc_ValueError, error_msg); \
346346
return NULL; \
347347
} \

‎Modules/getnameinfo.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
104104
u_longv4a;
105105
#ifdefENABLE_IPV6
106106
u_charpfx;
107-
#endif
108107
inth_error;
108+
#endif
109109
charnumserv[512];
110110
charnumaddr[512];
111111

@@ -181,7 +181,6 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
181181
hp=getipnodebyaddr(addr,gni_afd->a_addrlen,gni_afd->a_af,&h_error);
182182
#else
183183
hp=gethostbyaddr(addr,gni_afd->a_addrlen,gni_afd->a_af);
184-
h_error=h_errno;
185184
#endif
186185

187186
if (hp) {

‎Modules/signalmodule.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ compare_handler(PyObject *func, PyObject *dfl_ign_handler)
185185
returnPyObject_RichCompareBool(func,dfl_ign_handler,Py_EQ)==1;
186186
}
187187

188-
#ifdefHAVE_GETITIMER
189-
/* auxiliaryfunctions for setitimer */
188+
#ifdefHAVE_SETITIMER
189+
/* auxiliaryfunction for setitimer */
190190
staticint
191191
timeval_from_double(PyObject*obj,structtimeval*tv)
192192
{
@@ -202,7 +202,10 @@ timeval_from_double(PyObject *obj, struct timeval *tv)
202202
}
203203
return_PyTime_AsTimeval(t,tv,_PyTime_ROUND_CEILING);
204204
}
205+
#endif
205206

207+
#if defined(HAVE_SETITIMER)|| defined(HAVE_GETITIMER)
208+
/* auxiliary functions for get/setitimer */
206209
Py_LOCAL_INLINE(double)
207210
double_from_timeval(structtimeval*tv)
208211
{

‎Modules/socketmodule.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ init_sockobject(PySocketSockObject *s,
996996
}
997997

998998

999+
#ifdefHAVE_SOCKETPAIR
9991000
/* Create a new socket object.
10001001
This just creates the object and initializes it.
10011002
If the creation fails, return NULL and set an exception (implicit
@@ -1015,6 +1016,7 @@ new_sockobject(SOCKET_T fd, int family, int type, int proto)
10151016
}
10161017
returns;
10171018
}
1019+
#endif
10181020

10191021

10201022
/* Lock to allow python interpreter to continue, but only allow one

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp