Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ef352f

Browse files
authored
Merge pull request #10775 from QuLogic/gcc8-warnings
Fix new warnings with gcc8
2 parents 7e84064 + 0c0797b commit 3ef352f

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

MANIFEST.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
include INSTALL.rst README.rst
2-
include CONTRIBUTING.md
32
include pytest.ini
4-
include Makefile MANIFEST.in
3+
include MANIFEST.in
54
include matplotlibrc.template setup.cfg.template
6-
include setupext.py setup.py distribute_setup.py
5+
include setupext.py setup.py
76
include lib/matplotlib/mpl-data/lineprops.glade
87
include lib/matplotlib/mpl-data/matplotlibrc
98
include lib/matplotlib/mpl-data/images/*

src/_path_wrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,15 +441,15 @@ static PyObject *Py_affine_transform(PyObject *self, PyObject *args, PyObject *k
441441
numpy::array_view<double, 2> result(dims);
442442
CALL_CPP("affine_transform", (affine_transform_2d(vertices, trans, result)));
443443
return result.pyobj();
444-
} catch (py::exception) {
444+
} catch (py::exception &) {
445445
PyErr_Clear();
446446
try {
447447
numpy::array_view<double, 1> vertices(vertices_obj);
448448
npy_intp dims[] = { (npy_intp)vertices.size() };
449449
numpy::array_view<double, 1> result(dims);
450450
CALL_CPP("affine_transform", (affine_transform_1d(vertices, trans, result)));
451451
return result.pyobj();
452-
} catch (py::exception) {
452+
} catch (py::exception &) {
453453
return NULL;
454454
}
455455
}

src/py_converters.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ int convert_rect(PyObject *rectobj, void *rectp)
167167
rect->x2 = rect_arr(1, 0);
168168
rect->y2 = rect_arr(1, 1);
169169
}
170-
catch (py::exception)
170+
catch (py::exception &)
171171
{
172172
PyErr_Clear();
173173

@@ -185,7 +185,7 @@ int convert_rect(PyObject *rectobj, void *rectp)
185185
rect->x2 = rect_arr(2);
186186
rect->y2 = rect_arr(3);
187187
}
188-
catch (py::exception)
188+
catch (py::exception &)
189189
{
190190
return 0;
191191
}
@@ -347,7 +347,7 @@ int convert_trans_affine(PyObject *obj, void *transp)
347347
return 1;
348348
}
349349
}
350-
catch (py::exception)
350+
catch (py::exception &)
351351
{
352352
return 0;
353353
}

src/py_exceptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class exception : public std::exception
3030
} \
3131
return (errorcode); \
3232
} \
33-
catch (const std::bad_alloc) \
33+
catch (const std::bad_alloc &) \
3434
{ \
3535
PyErr_Format(PyExc_MemoryError, "In %s: Out of memory", (name)); \
3636
{ \

0 commit comments

Comments
 (0)