Fix compilation with gcc 8

Apparently some nitwit Linux distros have made an unreleased compiler
their default compiler. Fixes #376

Fixes various new warnings that GCC 8 issues
This commit is contained in:
Kovid Goyal
2018-03-12 10:38:12 +05:30
parent 0333da991d
commit 527255e3a1
18 changed files with 66 additions and 52 deletions

View File

@@ -46,7 +46,7 @@ linebuf_mark_line_clean(LineBuf *self, index_type y) {
}
static PyObject*
clear(LineBuf *self) {
clear(LineBuf *self, PyObject *a UNUSED) {
#define clear_doc "Clear all lines in this LineBuf"
linebuf_clear(self, BLANK_CHAR);
Py_RETURN_NONE;
@@ -167,7 +167,7 @@ set_continued(LineBuf *self, PyObject *args) {
}
static PyObject*
dirty_lines(LineBuf *self) {
dirty_lines(LineBuf *self, PyObject *a UNUSED) {
#define dirty_lines_doc "dirty_lines() -> Line numbers of all lines that have dirty text."
PyObject *ans = PyList_New(0);
for (index_type i = 0; i < self->ynum; i++) {