Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39b0f89

Browse files
committed
Address warnings issued by the MSVC++ compiler
1 parent 462a549 commit 39b0f89

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

Modules/pcremodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ PyPcre_compile(self, args)
193193
PyObject *dictionary;
194194
char *pattern;
195195
const char *error;
196-
int num_zeros, i, j;
197196

198197
int options, erroroffset;
199198
if (!PyArg_ParseTuple(args, "siO!", &pattern, &options,

Modules/pypcre.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3044,8 +3044,8 @@ if (md->off_num) free(md->off_num);
30443044
if (md->offset_top) free(md->offset_top);
30453045
if (md->r1) free(md->r1);
30463046
if (md->r2) free(md->r2);
3047-
if (md->eptr) free(md->eptr);
3048-
if (md->ecode) free(md->ecode);
3047+
if (md->eptr) free((char *)md->eptr);
3048+
if (md->ecode) free((char *)md->ecode);
30493049
return 0;
30503050
}
30513051

Python/import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ find_module(name, path, buf, buflen, p_fp)
858858
}
859859
else if (PyString_Check(path)) {
860860
/* Submodule of frozen package */
861-
if (PyString_Size(path) + 1 + strlen(name) >= buflen) {
861+
if (PyString_Size(path) + 1 + strlen(name) >= (unsigned int)buflen) {
862862
PyErr_SetString(PyExc_ImportError,
863863
"full frozen module name too long");
864864
return NULL;

Python/mystrtoul.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ int base;
129129
result = result * base + c;
130130
#ifndef MPW
131131
if(base == 10) {
132-
if(((long)(result - c) / base != temp)) /* overflow */
132+
if(((long)(result - c) / base != (long)temp)) /* overflow */
133133
ovf = 1;
134134
}
135135
else {

0 commit comments

Comments
 (0)