summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorTimothy Redaelli <tredaelli@redhat.com>2022-07-18 12:40:02 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-07-22 17:08:03 +0200
commitd3c14abf47055c9d4a017551c92f406ad4bced76 (patch)
tree25939111dffd997a8af564e440e983bcd4f15c76 /python
parent54ebc235ae4bc1aa76dfb3b44765a0a21926f26a (diff)
downloadopenvswitch-d3c14abf47055c9d4a017551c92f406ad4bced76.tar.gz
python-c-ext: Fix a couple of build warnings.
ovs/_json.c:67:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] ovs/_json.c:132:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'python')
-rw-r--r--python/ovs/_json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/ovs/_json.c b/python/ovs/_json.c
index 80bf9dea3..0b980038b 100644
--- a/python/ovs/_json.c
+++ b/python/ovs/_json.c
@@ -50,7 +50,7 @@ Parser_feed(json_ParserObject * self, PyObject * args)
Py_ssize_t input_sz;
PyObject *input;
size_t rd;
- char *input_str;
+ const char *input_str;
if (self->_parser == NULL) {
return NULL;
@@ -111,7 +111,7 @@ json_to_python(struct json *json)
return dict;
}
case JSON_ARRAY:{
- int i;
+ size_t i;
PyObject *arr = PyList_New(json->array.n);
if (arr == NULL) {