Fix compiler warnings
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 07dad3a..890a356 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -1431,7 +1431,7 @@
 
     /* Read a chunk, decode it, and put the result in self._decoded_chars. */
     if (size_hint > 0) {
-        size_hint = Py_MAX(self->b2cratio, 1.0) * size_hint;
+        size_hint = (Py_ssize_t)(Py_MAX(self->b2cratio, 1.0) * size_hint);
     }
     chunk_size = PyLong_FromSsize_t(Py_MAX(self->chunk_size, size_hint));
     if (chunk_size == NULL)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 975cd9a..fe92491 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7756,9 +7756,9 @@
     PyObject *os1, *os2;
     char *s1, *s2;
     char *newenv;
+    size_t len;
 #endif
     PyObject *newstr = NULL;
-    size_t len;
 
 #ifdef MS_WINDOWS
     if (!PyArg_ParseTuple(args,
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 16db801..e715567 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -4330,7 +4330,8 @@
 refit_partial_string(PyObject **unicode, int kind, void *data, Py_ssize_t n)
 {
     PyObject *tmp;
-    Py_ssize_t k, maxchar;
+    Py_ssize_t k;
+    Py_UCS4 maxchar;
     for (k = 0, maxchar = 0; k < n; k++)
         maxchar = Py_MAX(maxchar, PyUnicode_READ(kind, data, k));
     tmp = PyUnicode_New(PyUnicode_GET_LENGTH(*unicode), maxchar);