]> granicus.if.org Git - python/commitdiff
Silenced minor GCC warnings.
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 26 Feb 2015 13:27:57 +0000 (15:27 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 26 Feb 2015 13:27:57 +0000 (15:27 +0200)
Modules/_ctypes/_ctypes.c
Modules/_testcapimodule.c
Modules/socketmodule.c
Programs/_freeze_importlib.c

index 23b8e93b462982d88c3789dcc48512f324b693f0..6531aecc0871d27cb52f51d69efa918448eca4bf 100644 (file)
@@ -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)
index 74159a7b525b229d2cbd59255fc97ff7b8392c71..08aa9c701ca4cda3ac1d69e8ce0ff6a33059c416 100644 (file)
@@ -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
 }
 
 
index 7c7cb7de6fdc0e8cbbc738961daf90f89080686b..4eb3978bec80ae87a6878fd3995c213e84bbf214 100644 (file)
@@ -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
index d0c33e2336731ffab7cce6dde254584284382d38..31b3d31bd7da79a767704b2294b5149904accf96 100644 (file)
@@ -17,7 +17,7 @@
    of frozen modules instead, left deliberately blank so as to avoid
    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 */
 };