]> granicus.if.org Git - python/commitdiff
Fix other warnings under 64-bit Windows.
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 15 Aug 2010 18:07:50 +0000 (18:07 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 15 Aug 2010 18:07:50 +0000 (18:07 +0000)
Modules/binascii.c
Modules/mmapmodule.c
Modules/posixmodule.c

index 23ce3f0eed7b6b00f562255bba0823cf83b24f2b..8b9c5f5dada356af0dbc6c63ccbfd760374b0994 100644 (file)
@@ -664,7 +664,7 @@ binascii_rlecode_hqx(PyObject *self, PyObject *args)
                 /* More than 3 in a row. Output RLE. */
                 *out_data++ = ch;
                 *out_data++ = RUNCHAR;
-                *out_data++ = inend-in;
+                *out_data++ = (unsigned char) inend-in;
                 in = inend-1;
             } else {
                 /* Less than 3. Output the byte itself */
index 3973124e14b9544f2d77fe07f104f76ee25a76b9..8c5c8ac80a00b090d3c0eeabcaab95fa9622f391 100644 (file)
@@ -878,7 +878,7 @@ mmap_ass_subscript(mmap_object *self, PyObject *item, PyObject *value)
                             "in range(0, 256)");
             return -1;
         }
-        self->data[i] = v;
+        self->data[i] = (char) v;
         return 0;
     }
     else if (PySlice_Check(item)) {
index 73fab71ee212785723884a07d6efe29ee097e719..821fed28eeaede1f9a457abfa84ba4a3728df6ef 100644 (file)
@@ -385,7 +385,7 @@ _PyVerify_fd(int fd)
     const int i1 = fd >> IOINFO_L2E;
     const int i2 = fd & ((1 << IOINFO_L2E) - 1);
 
-    static int sizeof_ioinfo = 0;
+    static size_t sizeof_ioinfo = 0;
 
     /* Determine the actual size of the ioinfo structure,
      * as used by the CRT loaded in memory
@@ -3655,8 +3655,8 @@ posix_spawnve(PyObject *self, PyObject *args)
     char **argvlist;
     char **envlist;
     PyObject *res = NULL;
-    int mode, envc;
-    Py_ssize_t argc, i;
+    int mode;
+    Py_ssize_t argc, i, envc;
     Py_intptr_t spawnval;
     PyObject *(*getitem)(PyObject *, Py_ssize_t);
     Py_ssize_t lastarg = 0;
@@ -3841,7 +3841,8 @@ posix_spawnvpe(PyObject *self, PyObject *args)
     char **argvlist;
     char **envlist;
     PyObject *res=NULL;
-    int mode, i, argc, envc;
+    int mode;
+    Py_ssize_t argc, i, envc;
     Py_intptr_t spawnval;
     PyObject *(*getitem)(PyObject *, Py_ssize_t);
     int lastarg = 0;