diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-26 13:27:57 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-26 13:27:57 (GMT) |
commit | b48af340b9e6c8775fb9da9cab06e922d0bd0127 (patch) | |
tree | f53af08a17612daf55f4e446e3e49df0be97ced4 /Modules | |
parent | e71258a0e67cf744f5f2c0bca15f1d66871ce050 (diff) | |
download | cpython-b48af340b9e6c8775fb9da9cab06e922d0bd0127.zip cpython-b48af340b9e6c8775fb9da9cab06e922d0bd0127.tar.gz cpython-b48af340b9e6c8775fb9da9cab06e922d0bd0127.tar.bz2 |
Silenced minor GCC warnings.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 5 | ||||
-rw-r--r-- | Modules/_testcapimodule.c | 7 | ||||
-rw-r--r-- | Modules/socketmodule.c | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 23b8e93..6531aec 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -2819,8 +2819,9 @@ _PyCData_set(CDataObject *dst, PyObject *type, SETFUNC setfunc, PyObject *value, src->b_ptr, size); - if (PyCPointerTypeObject_Check(type)) - /* XXX */; + if (PyCPointerTypeObject_Check(type)) { + /* XXX */ + } value = GetKeepedObjects(src); if (value == NULL) diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 74159a7..08aa9c7 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -69,6 +69,10 @@ test_config(PyObject *self) static PyObject* test_sizeof_c_types(PyObject *self) { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif #define CHECK_SIZEOF(TYPE, EXPECTED) \ if (EXPECTED != sizeof(TYPE)) { \ PyErr_Format(TestError, \ @@ -126,6 +130,9 @@ test_sizeof_c_types(PyObject *self) #undef IS_SIGNED #undef CHECK_SIGNESS #undef CHECK_SIZEOF +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 7c7cb7d..4eb3978 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1966,8 +1966,15 @@ cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif + #ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif if (msg->msg_controllen < 0) return 0; + #ifdef __GNUC__ + #pragma GCC diagnostic pop + #endif #ifdef __clang__ #pragma clang diagnostic pop #endif |