mirror of https://github.com/python/cpython
Silenced minor GCC warnings.
This commit is contained in:
parent
e71258a0e6
commit
b48af340b9
|
@ -2819,8 +2819,9 @@ _PyCData_set(CDataObject *dst, PyObject *type, SETFUNC setfunc, PyObject *value,
|
||||||
src->b_ptr,
|
src->b_ptr,
|
||||||
size);
|
size);
|
||||||
|
|
||||||
if (PyCPointerTypeObject_Check(type))
|
if (PyCPointerTypeObject_Check(type)) {
|
||||||
/* XXX */;
|
/* XXX */
|
||||||
|
}
|
||||||
|
|
||||||
value = GetKeepedObjects(src);
|
value = GetKeepedObjects(src);
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
|
|
|
@ -69,6 +69,10 @@ test_config(PyObject *self)
|
||||||
static PyObject*
|
static PyObject*
|
||||||
test_sizeof_c_types(PyObject *self)
|
test_sizeof_c_types(PyObject *self)
|
||||||
{
|
{
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||||
|
#endif
|
||||||
#define CHECK_SIZEOF(TYPE, EXPECTED) \
|
#define CHECK_SIZEOF(TYPE, EXPECTED) \
|
||||||
if (EXPECTED != sizeof(TYPE)) { \
|
if (EXPECTED != sizeof(TYPE)) { \
|
||||||
PyErr_Format(TestError, \
|
PyErr_Format(TestError, \
|
||||||
|
@ -126,6 +130,9 @@ test_sizeof_c_types(PyObject *self)
|
||||||
#undef IS_SIGNED
|
#undef IS_SIGNED
|
||||||
#undef CHECK_SIGNESS
|
#undef CHECK_SIGNESS
|
||||||
#undef CHECK_SIZEOF
|
#undef CHECK_SIZEOF
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1966,8 +1966,15 @@ cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space)
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||||
|
#endif
|
||||||
if (msg->msg_controllen < 0)
|
if (msg->msg_controllen < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
of frozen modules instead, left deliberately blank so as to avoid
|
of frozen modules instead, left deliberately blank so as to avoid
|
||||||
unintentional import of a stale version of _frozen_importlib. */
|
unintentional import of a stale version of _frozen_importlib. */
|
||||||
|
|
||||||
const static struct _frozen _PyImport_FrozenModules[] = {
|
static const struct _frozen _PyImport_FrozenModules[] = {
|
||||||
{0, 0, 0} /* sentinel */
|
{0, 0, 0} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue