8000 Cleanup clang warnings by jenshnielsen · Pull Request #6052 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Cleanup clang warnings #6052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 14, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments. 8000
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use Numpy macros for formatting
Should ensure correct formatting in both 32 and 64 bit
  • Loading branch information
jenshnielsen committed Mar 7, 2016
commit 0c0b5dfb581626919990fed8fce48145d587e0d7
10 changes: 5 additions & 5 deletions src/_backend_agg_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,14 @@ PyRendererAgg_draw_gouraud_triangle(PyRendererAgg *self, PyObject *args, PyObjec

if (points.dim(0) != 3 || points.dim(1) != 2) {
PyErr_Format(PyExc_ValueError,
"points must be a 3x2 array, got %ldx%ld",
"points must be a 3x2 array, got %"NPY_INTP_FMT"x%"NPY_INTP_FMT,
points.dim(0), points.dim(1));
return NULL;
}

if (colors.dim(0) != 3 || colors.dim(1) != 4) {
PyErr_Format(PyExc_ValueError,
"colors must be a 3x4 array, got %ldx%ld",
"colors must be a 3x4 array, got %"NPY_INTP_FMT"x%"NPY_INTP_FMT,
colors.dim(0), colors.dim(1));
return NULL;
}
Expand Down Expand Up @@ -490,21 +490,21 @@ PyRendererAgg_draw_gouraud_triangles(PyRendererAgg *self, PyObject *args, PyObje

if (points.size() != 0 && (points.dim(1) != 3 || points.dim(2) != 2)) {
PyErr_Format(PyExc_ValueError,
"points must be a Nx3x2 array, got %ldx%ldx%ld",
"points must be a Nx3x2 array, got %"NPY_INTP_FMT"x%"NPY_INTP_FMT"x%"NPY_INTP_FMT,
points.dim(0), points.dim(1), points.dim(2));
return NULL;
}

if (colors.size() != 0 && (colors.dim(1) != 3 || colors.dim(2) != 4)) {
PyErr_Format(PyExc_ValueError,
"colors must be a Nx3x4 array, got %ldx%ldx%ld",
"colors must be a Nx3x4 array, got %"NPY_INTP_FMT"x%"NPY_INTP_FMT"x%"NPY_INTP_FMT,
colors.dim(0), colors.dim(1), colors.dim(2));
return NULL;
}

if (points.size() != colors.size()) {
PyErr_Format(PyExc_ValueError,
"points and colors arrays must be the same length, got %ld and %ld",
"points and colors arrays must be the same length, got %"NPY_INTP_FMT" and %"NPY_INTP_FMT,
points.dim(0), colors.dim(0));
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/_image_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ image_resample(PyObject *self, PyObject* args, PyObject *kwargs)
} else {
PyErr_Format(
PyExc_ValueError,
"If 3-dimensional, array must be RGBA. Got %ld planes.",
"If 3-dimensional, array must be RGBA. Got %" NPY_INTP_FMT " planes.",
PyArray_DIM(input_array, 2));
goto error;
}
Expand Down
2 changes: 1 addition & 1 deletion src/_path_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static PyObject *Py_update_path_extents(PyObject *self, PyObject *args, PyObject

if (minpos.dim(0) != 2) {
PyErr_Format(PyExc_ValueError,
"minpos must be of length 2, got %ld",
"minpos must be of length 2, got %"NPY_INTP_FMT,
minpos.dim(0));
return NULL;
}
Expand Down
8 changes: 4 additions & 4 deletions src/py_converters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ int convert_points(PyObject *obj, void *pointsp)

if (points->dim(1) != 2) {
PyErr_Format(PyExc_ValueError,
"Points must be Nx2 array, got %ldx%ld",
"Points must be Nx2 array, got %"NPY_INTP_FMT"x%"NPY_INTP_FMT,
points->dim(0), points->dim(1));
return 0;
}
Expand All @@ -559,7 +559,7 @@ int convert_transforms(PyObject *obj, void *transp)

if (trans->dim(1) != 3 || trans->dim(2) != 3) {
PyErr_Format(PyExc_ValueError,
"Transforms must be Nx3x3 array, got %ldx%ldx%ld",
"Transforms must be Nx3x3 array, got %"NPY_INTP_FMT"x%"NPY_INTP_FMT"x%"NPY_INTP_FMT,
trans->dim(0), trans->dim(1), trans->dim(2));
return 0;
}
Expand All @@ -583,7 +583,7 @@ int convert_bboxes(PyObject *obj, void *bboxp)

if (bbox->dim(1) != 2 || bbox->dim(2) != 2) {
PyErr_Format(PyExc_ValueError,
"Bbox array must be Nx2x2 array, got %ldx%ldx%ld",
"Bbox array must be Nx2x2 array, got %"NPY_INTP_FMT"x%"NPY_INTP_FMT"x%"NPY_INTP_FMT,
bbox->dim(0), bbox->dim(1), bbox->dim(2));
return 0;
}
Expand All @@ -607,7 +607,7 @@ int convert_colors(PyObject *obj, void *colorsp)

if (colors->dim(1) != 4) {
PyErr_Format(PyExc_ValueError,
"Colors array must be Nx4 array, got %ldx%ld",
"Colors array must be Nx4 array, got %"NPY_INTP_FMT"x%"NPY_INTP_FMT,
colors->dim(0), colors->dim(1));
return 0;
}
Expand Down
0