]> granicus.if.org Git - python/commitdiff
Address warnings issued by the MSVC++ compiler
authorGuido van Rossum <guido@python.org>
Fri, 10 Apr 1998 21:52:06 +0000 (21:52 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 10 Apr 1998 21:52:06 +0000 (21:52 +0000)
Modules/pcremodule.c
Modules/pypcre.c
Python/import.c
Python/mystrtoul.c

index 07a36fa6b2cc26bd3696263cf9e2d104f4866f49..40efd03cf3128cd5edbe5a5ebe1c4e3f2d0cddf3 100644 (file)
@@ -193,7 +193,6 @@ PyPcre_compile(self, args)
        PyObject *dictionary;
        char *pattern;
        const char *error;
-       int num_zeros, i, j;
        
        int options, erroroffset;
        if (!PyArg_ParseTuple(args, "siO!", &pattern, &options,
index bec9197e6fdd279f9248512ac101a93f4e49e943..ab8c477ec807fcbc206896ee8e68e41f0c0352e8 100644 (file)
@@ -3044,8 +3044,8 @@ if (md->off_num)    free(md->off_num);
 if (md->offset_top) free(md->offset_top); 
 if (md->r1)         free(md->r1); 
 if (md->r2)         free(md->r2); 
-if (md->eptr)       free(md->eptr); 
-if (md->ecode)      free(md->ecode);
+if (md->eptr)       free((char *)md->eptr); 
+if (md->ecode)      free((char *)md->ecode);
 return 0;
 }
 
index 6ab1371b0a05fd3e0b62532407e23e810740a4a2..c9cc9de9c9b4b1e81c170ce3424697d44eb76c90 100644 (file)
@@ -858,7 +858,7 @@ find_module(name, path, buf, buflen, p_fp)
        }
        else if (PyString_Check(path)) {
                /* Submodule of frozen package */
-               if (PyString_Size(path) + 1 + strlen(name) >= buflen) {
+               if (PyString_Size(path) + 1 + strlen(name) >= (unsigned int)buflen) {
                        PyErr_SetString(PyExc_ImportError,
                                        "full frozen module name too long");
                        return NULL;
index 46c52b8be96f4fed2d7ff2ac56956144c06bc727..f8135e1761b29ad33b51110e4bb3528d794bf2f9 100644 (file)
@@ -129,7 +129,7 @@ int         base;
        result = result * base + c;
 #ifndef MPW
        if(base == 10) {
-               if(((long)(result - c) / base != temp)) /* overflow */
+               if(((long)(result - c) / base != (long)temp))   /* overflow */
                        ovf = 1;
        }
        else {