| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1578,19 +1578,19 @@ _path_module::convert_to_svg(const Py::Tuple& args) | |||
| 1578 | 1578 | #if PY_VERSION_HEX >= 0x02070000 | |
| 1579 | 1579 | char* str; | |
| 1580 | 1580 | str = PyOS_double_to_string(x, 'g', precision, 0, NULL); | |
| 1581 | - p += snprintf(p, buffersize - (p - buffer), str); | ||
| 1581 | + p += snprintf(p, buffersize - (p - buffer), "%s", str); | ||
| 1582 | 1582 | PyMem_Free(str); | |
| 1583 | 1583 | *p++ = ' '; | |
| 1584 | 1584 | str = PyOS_double_to_string(y, 'g', precision, 0, NULL); | |
| 1585 | - p += snprintf(p, buffersize - (p - buffer), str); | ||
| 1585 | + p += snprintf(p, buffersize - (p - buffer), "%s", str); | ||
| 1586 | 1586 | PyMem_Free(str); | |
| 1587 | 1587 | #else | |
| 1588 | 1588 | char str[64]; | |
| 1589 | 1589 | PyOS_ascii_formatd(str, 64, format, x); | |
| 1590 | - p += snprintf(p, buffersize - (p - buffer), str); | ||
| 1590 | + p += snprintf(p, buffersize - (p - buffer), "%s", str); | ||
| 1591 | 1591 | *p++ = ' '; | |
| 1592 | 1592 | PyOS_ascii_formatd(str, 64, format, y); | |
| 1593 | - p += snprintf(p, buffersize - (p - buffer), str); | ||
| 1593 | + p += snprintf(p, buffersize - (p - buffer), "%s", str); | ||
| 1594 | 1594 | #endif | |
| 1595 | 1595 | ||
| 1596 | 1596 | --wait; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1366,8 +1366,8 @@ int reorder(double *xpp, double *ypp, short *kpp, | |||
| 1366 | 1366 | int maxnsegs = npts/2 + 1; | |
| 1367 | 1367 | ||
| 1368 | 1368 | /* allocate maximum possible size--gross overkill */ | |
| 1369 | - i0 = malloc(maxnsegs * sizeof(int)); | ||
| 1370 | - i1 = malloc(maxnsegs * sizeof(int)); | ||
| 1369 | + i0 = (int *)malloc(maxnsegs * sizeof(int)); | ||
| 1370 | + i1 = (int *)malloc(maxnsegs * sizeof(int)); | ||
| 1371 | 1371 | ||
| 1372 | 1372 | /* Find the segments. */ | |
| 1373 | 1373 | iseg = 0; | |
@@ -1400,7 +1400,7 @@ int reorder(double *xpp, double *ypp, short *kpp, | |||
| 1400 | 1400 | ||
| 1401 | 1401 | /* Find the subpaths as sets of connected segments. */ | |
| 1402 | 1402 | ||
| 1403 | - subp = malloc(nsegs * sizeof(int)); | ||
| 1403 | + subp = (int *)malloc(nsegs * sizeof(int)); | ||
| 1404 | 1404 | for (i=0; i<nsegs; i++) subp[i] = -1; | |
| 1405 | 1405 | ||
| 1406 | 1406 | nsp = 0; | |
@@ -1776,15 +1776,15 @@ Cntr_new(PyTypeObject *type, PyObject *args, PyObject *kwds) | |||
| 1776 | 1776 | static int | |
| 1777 | 1777 | Cntr_init(Cntr *self, PyObject *args, PyObject *kwds) | |
| 1778 | 1778 | { | |
| 1779 | - static char *kwlist[] = {"x", "y", "z", "mask", NULL}; | ||
| 1779 | + static const char *kwlist[] = {"x", "y", "z", "mask", NULL}; | ||
| 1780 | 1780 | PyObject *xarg, *yarg, *zarg, *marg; | |
| 1781 | 1781 | PyArrayObject *xpa, *ypa, *zpa, *mpa; | |
| 1782 | 1782 | long iMax, jMax; | |
| 1783 | 1783 | char *mask; | |
| 1784 | 1784 | ||
| 1785 | 1785 | marg = NULL; | |
| 1786 | 1786 | ||
| 1787 | - if (! PyArg_ParseTupleAndKeywords(args, kwds, "OOO|O", kwlist, | ||
| 1787 | + if (! PyArg_ParseTupleAndKeywords(args, kwds, "OOO|O", (char **)kwlist, | ||
| 1788 | 1788 | &xarg, &yarg, &zarg, &marg)) | |
| 1789 | 1789 | return -1; | |
| 1790 | 1790 | if (marg == Py_None) | |
@@ -1858,9 +1858,9 @@ Cntr_trace(Cntr *self, PyObject *args, PyObject *kwds) | |||
| 1858 | 1858 | double levels[2] = {0.0, -1e100}; | |
| 1859 | 1859 | int nlevels = 2; | |
| 1860 | 1860 | long nchunk = 0L; | |
| 1861 | - static char *kwlist[] = {"level0", "level1", "nchunk", NULL}; | ||
| 1861 | + static const char *kwlist[] = {"level0", "level1", "nchunk", NULL}; | ||
| 1862 | 1862 | ||
| 1863 | - if (! PyArg_ParseTupleAndKeywords(args, kwds, "d|dl", kwlist, | ||
| 1863 | + if (! PyArg_ParseTupleAndKeywords(args, kwds, "d|dl", (char **)kwlist, | ||
| 1864 | 1864 | levels, levels+1, &nchunk)) | |
| 1865 | 1865 | { | |
| 1866 | 1866 | return NULL; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments