Skip to content

Commit

Permalink
python-c-ext: Fix a couple of build warnings.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
drizzt authored and igsilya committed Jul 22, 2022
1 parent 54ebc23 commit d3c14ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/ovs/_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit d3c14ab

Please sign in to comment.