This commit is contained in:
Kovid Goyal 2016-12-02 17:17:44 +05:30
parent e7986838d8
commit 067c5f25b8
2 changed files with 5 additions and 1 deletions

View File

@ -14,7 +14,9 @@ static char drain_buf[1024] = {0};
static PyObject* static PyObject*
drain_read(PyObject UNUSED *self, PyObject *fd) { drain_read(PyObject UNUSED *self, PyObject *fd) {
(void)read(PyLong_AsLong(fd), drain_buf, sizeof(drain_buf)); ALLOW_UNUSED_RESULT
read(PyLong_AsLong(fd), drain_buf, sizeof(drain_buf));
END_ALLOW_UNUSED_RESULT
Py_RETURN_NONE; Py_RETURN_NONE;
} }

View File

@ -129,6 +129,8 @@ typedef unsigned int index_type;
#define START_ALLOW_CASE_RANGE _Pragma("GCC diagnostic ignored \"-Wpedantic\"") #define START_ALLOW_CASE_RANGE _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
#define END_ALLOW_CASE_RANGE _Pragma("GCC diagnostic pop") #define END_ALLOW_CASE_RANGE _Pragma("GCC diagnostic pop")
#define ALLOW_UNUSED_RESULT _Pragma("GCC diagnostic ignored \"-Wunused-result\"")
#define END_ALLOW_UNUSED_RESULT _Pragma("GCC diagnostic pop")
typedef struct { typedef struct {
PyObject_HEAD PyObject_HEAD