Kaydet (Commit) d39d861a authored tarafından Neal Norwitz's avatar Neal Norwitz

Fix icc warnings: strlen() returns size_t

üst 2841af4c
...@@ -62,7 +62,7 @@ static int ...@@ -62,7 +62,7 @@ static int
zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds) zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
{ {
char *path, *p, *prefix, buf[MAXPATHLEN+2]; char *path, *p, *prefix, buf[MAXPATHLEN+2];
int len; size_t len;
if (!_PyArg_NoKeywords("zipimporter()", kwds)) if (!_PyArg_NoKeywords("zipimporter()", kwds))
return -1; return -1;
...@@ -231,7 +231,7 @@ get_subname(char *fullname) ...@@ -231,7 +231,7 @@ get_subname(char *fullname)
static int static int
make_filename(char *prefix, char *name, char *path) make_filename(char *prefix, char *name, char *path)
{ {
int len; size_t len;
char *p; char *p;
len = strlen(prefix); len = strlen(prefix);
...@@ -249,7 +249,7 @@ make_filename(char *prefix, char *name, char *path) ...@@ -249,7 +249,7 @@ make_filename(char *prefix, char *name, char *path)
*p = SEP; *p = SEP;
} }
len += strlen(name); len += strlen(name);
return len; return (int)len;
} }
enum zi_module_info { enum zi_module_info {
...@@ -659,7 +659,8 @@ read_directory(char *archive) ...@@ -659,7 +659,8 @@ read_directory(char *archive)
FILE *fp; FILE *fp;
long compress, crc, data_size, file_size, file_offset, date, time; long compress, crc, data_size, file_size, file_offset, date, time;
long header_offset, name_size, header_size, header_position; long header_offset, name_size, header_size, header_position;
long i, l, length, count; long i, l, count;
size_t length;
char path[MAXPATHLEN + 5]; char path[MAXPATHLEN + 5];
char name[MAXPATHLEN + 5]; char name[MAXPATHLEN + 5];
char *p, endof_central_dir[22]; char *p, endof_central_dir[22];
......
...@@ -44,7 +44,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr) ...@@ -44,7 +44,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
double val = -1.0; double val = -1.0;
struct lconv *locale_data; struct lconv *locale_data;
const char *decimal_point; const char *decimal_point;
int decimal_point_len; size_t decimal_point_len;
const char *p, *decimal_point_pos; const char *p, *decimal_point_pos;
const char *end = NULL; /* Silence gcc */ const char *end = NULL; /* Silence gcc */
...@@ -165,9 +165,8 @@ PyOS_ascii_formatd(char *buffer, ...@@ -165,9 +165,8 @@ PyOS_ascii_formatd(char *buffer,
{ {
struct lconv *locale_data; struct lconv *locale_data;
const char *decimal_point; const char *decimal_point;
int decimal_point_len; size_t decimal_point_len, rest_len;
char *p; char *p;
int rest_len;
char format_char; char format_char;
/* g_return_val_if_fail (buffer != NULL, NULL); */ /* g_return_val_if_fail (buffer != NULL, NULL); */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment