upcast int to size_t to silence two autological-constant-out-of-range-compare warnings with clang.

This commit is contained in:
Christian Heimes 2013-12-04 08:42:46 +01:00
parent 7a934fb48d
commit 724b828e79
2 changed files with 2 additions and 2 deletions

View file

@ -91,7 +91,7 @@ PyNode_AddChild(node *n1, int type, char *str, int lineno, int col_offset)
if (current_capacity < 0 || required_capacity < 0)
return E_OVERFLOW;
if (current_capacity < required_capacity) {
if (required_capacity > PY_SIZE_MAX / sizeof(node)) {
if ((size_t)required_capacity > PY_SIZE_MAX / sizeof(node)) {
return E_NOMEM;
}
n = n1->n_child;