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

Commit81686e7

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

File tree

7 files changed

+12
-8
lines changed

7 files changed

+12
-8
lines changed

‎Modules/_io/bufferedio.c‎

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

330330
#defineCHECK_CLOSED(self,error_msg) \
331-
if (IS_CLOSED(self) & (Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t) == 0)) { \
331+
if (IS_CLOSED(self) && (Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t) == 0)) { \
332332
PyErr_SetString(PyExc_ValueError, error_msg); \
333333
return NULL; \
334334
} \

‎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
@@ -189,8 +189,8 @@ compare_handler(PyObject *func, PyObject *dfl_ign_handler)
189189
returnPyObject_RichCompareBool(func,dfl_ign_handler,Py_EQ)==1;
190190
}
191191

192-
#ifdefHAVE_GETITIMER
193-
/* auxiliaryfunctions for setitimer */
192+
#ifdefHAVE_SETITIMER
193+
/* auxiliaryfunction for setitimer */
194194
staticint
195195
timeval_from_double(PyObject*obj,structtimeval*tv)
196196
{
@@ -206,7 +206,10 @@ timeval_from_double(PyObject *obj, struct timeval *tv)
206206
}
207207
return_PyTime_AsTimeval(t,tv,_PyTime_ROUND_CEILING);
208208
}
209+
#endif
209210

211+
#if defined(HAVE_SETITIMER)|| defined(HAVE_GETITIMER)
212+
/* auxiliary functions for get/setitimer */
210213
Py_LOCAL_INLINE(double)
211214
double_from_timeval(structtimeval*tv)
212215
{

‎Modules/socketmodule.c‎

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

10151015

1016+
#ifdefHAVE_SOCKETPAIR
10161017
/* Create a new socket object.
10171018
This just creates the object and initializes it.
10181019
If the creation fails, return NULL and set an exception (implicit
@@ -1032,6 +1033,7 @@ new_sockobject(SOCKET_T fd, int family, int type, int proto)
10321033
}
10331034
returns;
10341035
}
1036+
#endif
10351037

10361038

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

‎Objects/stringlib/fastsearch.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ STRINGLIB(_preprocess)(const STRINGLIB_CHAR *needle, Py_ssize_t len_needle,
345345
}
346346
// Fill up a compressed Boyer-Moore "Bad Character" table
347347
Py_ssize_tnot_found_shift=Py_MIN(len_needle,MAX_SHIFT);
348-
for (Py_ssize_ti=0;i<TABLE_SIZE;i++) {
348+
for (Py_ssize_ti=0;i<(Py_ssize_t)TABLE_SIZE;i++) {
349349
p->table[i]=Py_SAFE_DOWNCAST(not_found_shift,
350350
Py_ssize_t,SHIFT_TYPE);
351351
}

‎configure‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6977,7 +6977,7 @@ PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes])
69776977
PY_STDLIB_MOD([_testimportmultiple],[test "$TEST_MODULES" = yes],[test "$ac_cv_func_dlopen" = yes])
69786978
PY_STDLIB_MOD([_testmultiphase],[test "$TEST_MODULES" = yes],[test "$ac_cv_func_dlopen" = yes])
69796979
PY_STDLIB_MOD([_xxtestfuzz],[test "$TEST_MODULES" = yes])
6980-
PY_STDLIB_MOD([_ctypes_test],[test "$TEST_MODULES" = yes],[],[],[-lm])
6980+
PY_STDLIB_MOD([_ctypes_test],[test "$TEST_MODULES" = yes],[test "$ac_cv_func_dlopen" = yes],[],[-lm])
69816981

69826982
dnl Limited API template modules.
69836983
dnl The limited C API is not compatible with the Py_TRACE_REFS macro.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp