diff --git a/Python/getargs.c b/Python/getargs.c index 3b73e410aeb..1dddae49917 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -411,7 +411,7 @@ convertsimple1(PyObject *arg, char **p_format, va_list *p_va) "byte-sized integer bitfield is less than minimum"); return "integer"; } - else if (ival > UCHAR_MAX) { + else if (ival > (int)UCHAR_MAX) { PyErr_SetString(PyExc_OverflowError, "byte-sized integer bitfield is greater than maximum"); return "integer";