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

gh-84461: Silence some compiler warnings on WASM (GH-93978)#93978

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tiran merged 3 commits intopython:mainfromtiran:gh-84461-compiler-warnings
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionModules/_io/bufferedio.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -328,7 +328,7 @@ _enter_buffered_busy(buffered *self)
: buffered_closed(self)))

#define CHECK_CLOSED(self, error_msg) \
if (IS_CLOSED(self) & (Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t) == 0)) { \
if (IS_CLOSED(self) && (Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t) == 0)) { \
PyErr_SetString(PyExc_ValueError, error_msg); \
return NULL; \
} \
Expand Down
3 changes: 1 addition & 2 deletionsModules/getnameinfo.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -104,8 +104,8 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
u_long v4a;
#ifdef ENABLE_IPV6
u_char pfx;
#endif
int h_error;
#endif
char numserv[512];
char numaddr[512];

Expand DownExpand Up@@ -181,7 +181,6 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
hp = getipnodebyaddr(addr, gni_afd->a_addrlen, gni_afd->a_af, &h_error);
#else
hp = gethostbyaddr(addr, gni_afd->a_addrlen, gni_afd->a_af);
h_error = h_errno;
#endif

if (hp) {
Expand Down
7 changes: 5 additions & 2 deletionsModules/signalmodule.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -189,8 +189,8 @@ compare_handler(PyObject *func, PyObject *dfl_ign_handler)
return PyObject_RichCompareBool(func, dfl_ign_handler, Py_EQ) == 1;
}

#ifdefHAVE_GETITIMER
/* auxiliaryfunctions for setitimer */
#ifdefHAVE_SETITIMER
/* auxiliaryfunction for setitimer */
static int
timeval_from_double(PyObject *obj, struct timeval *tv)
{
Expand All@@ -206,7 +206,10 @@ timeval_from_double(PyObject *obj, struct timeval *tv)
}
return _PyTime_AsTimeval(t, tv, _PyTime_ROUND_CEILING);
}
#endif

#if defined(HAVE_SETITIMER) || defined(HAVE_GETITIMER)
/* auxiliary functions for get/setitimer */
Py_LOCAL_INLINE(double)
double_from_timeval(struct timeval *tv)
{
Expand Down
2 changes: 2 additions & 0 deletionsModules/socketmodule.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1016,6 +1016,7 @@ init_sockobject(PySocketSockObject *s,
}


#ifdef HAVE_SOCKETPAIR
/* Create a new socket object.
This just creates the object and initializes it.
If the creation fails, return NULL and set an exception (implicit
Expand All@@ -1035,6 +1036,7 @@ new_sockobject(SOCKET_T fd, int family, int type, int proto)
}
return s;
}
#endif


/* Lock to allow python interpreter to continue, but only allow one
Expand Down
2 changes: 1 addition & 1 deletionObjects/stringlib/fastsearch.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -355,7 +355,7 @@ STRINGLIB(_preprocess)(const STRINGLIB_CHAR *needle, Py_ssize_t len_needle,
}
// Fill up a compressed Boyer-Moore "Bad Character" table
Py_ssize_t not_found_shift = Py_MIN(len_needle, MAX_SHIFT);
for (Py_ssize_t i = 0; i < TABLE_SIZE; i++) {
for (Py_ssize_t i = 0; i <(Py_ssize_t)TABLE_SIZE; i++) {
p->table[i] = Py_SAFE_DOWNCAST(not_found_shift,
Py_ssize_t, SHIFT_TYPE);
}
Expand Down
2 changes: 1 addition & 1 deletionconfigure
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

2 changes: 1 addition & 1 deletionconfigure.ac
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6911,7 +6911,7 @@ PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes])
PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])
PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])
PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
PY_STDLIB_MOD([_ctypes_test], [test "$TEST_MODULES" = yes], [], [], [-lm])
PY_STDLIB_MOD([_ctypes_test], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes], [], [-lm])

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

[8]ページ先頭

©2009-2025 Movatter.jp