summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-04-10 21:52:06 (GMT)
committerGuido van Rossum <guido@python.org>1998-04-10 21:52:06 (GMT)
commit39b0f8976caeb81e475454424f2a8d6e39609f52 (patch)
tree6ce7a1c3f4e4f236ef5ed6cb2d9d1dce38eef918
parent462a5495fb3e2df2163d38dfc27615004aada942 (diff)
downloadcpython-39b0f8976caeb81e475454424f2a8d6e39609f52.zip
cpython-39b0f8976caeb81e475454424f2a8d6e39609f52.tar.gz
cpython-39b0f8976caeb81e475454424f2a8d6e39609f52.tar.bz2
Address warnings issued by the MSVC++ compiler
-rw-r--r--Modules/pcremodule.c1
-rw-r--r--Modules/pypcre.c4
-rw-r--r--Python/import.c2
-rw-r--r--Python/mystrtoul.c2
4 files changed, 4 insertions, 5 deletions
diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c
index 07a36fa..40efd03 100644
--- a/Modules/pcremodule.c
+++ b/Modules/pcremodule.c
@@ -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,
diff --git a/Modules/pypcre.c b/Modules/pypcre.c
index bec9197..ab8c477 100644
--- a/Modules/pypcre.c
+++ b/Modules/pypcre.c
@@ -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;
}
diff --git a/Python/import.c b/Python/import.c
index 6ab1371..c9cc9de 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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;
diff --git a/Python/mystrtoul.c b/Python/mystrtoul.c
index 46c52b8..f8135e1 100644
--- a/Python/mystrtoul.c
+++ b/Python/mystrtoul.c
@@ -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 {