Mercurial > hg
comparison mercurial/mpatch_module.c @ 29742:b410e26692a4
mpatch: silence warning about maybe-uninitialized variable
It's false positive, but it wouldn't be possible for gcc to know
PyBytes_FromStringAndSize() sets PyErr_Occurred().
mercurial/mpatch_module.c:105:47: warning: 'r' may be used uninitialized
in this function [-Wmaybe-uninitialized]
PyErr_SetString(mpatch_Error, mpatch_errors[-r]);
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 07 Aug 2016 09:47:07 +0900 |
parents | 21ac534d7d30 |
children | 155f0cc3f813 |
comparison
equal
deleted
inserted
replaced
29741:9a1685c70db4 | 29742:b410e26692a4 |
---|---|
57 patches(PyObject *self, PyObject *args) | 57 patches(PyObject *self, PyObject *args) |
58 { | 58 { |
59 PyObject *text, *bins, *result; | 59 PyObject *text, *bins, *result; |
60 struct mpatch_flist *patch; | 60 struct mpatch_flist *patch; |
61 const char *in; | 61 const char *in; |
62 int r; | 62 int r = 0; |
63 char *out; | 63 char *out; |
64 Py_ssize_t len, outlen, inlen; | 64 Py_ssize_t len, outlen, inlen; |
65 | 65 |
66 if (!PyArg_ParseTuple(args, "OO:mpatch", &text, &bins)) | 66 if (!PyArg_ParseTuple(args, "OO:mpatch", &text, &bins)) |
67 return NULL; | 67 return NULL; |