Mercurial > cpython-lru_cache-weakref
diff Python/ast.c @ 36231:d3f4c467e439 legacy-trunk
Fix icc warnings: conversion from "long" to "int" may lose significant bits
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sun, 08 Jan 2006 01:06:06 +0000 |
| parents | 1685dcd2f929 |
| children | 557e9b6ee7e1 |
line wrap: on
line diff
--- a/Python/ast.c Sun Jan 08 01:03:36 2006 +0000 +++ b/Python/ast.c Sun Jan 08 01:06:06 2006 +0000 @@ -78,7 +78,7 @@ ast_error_finish(const char *filename) { PyObject *type, *value, *tback, *errstr, *loc, *tmp; - int lineno; + long lineno; assert(PyErr_Occurred()); if (!PyErr_ExceptionMatches(PyExc_SyntaxError)) @@ -101,7 +101,7 @@ Py_INCREF(Py_None); loc = Py_None; } - tmp = Py_BuildValue("(ziOO)", filename, lineno, Py_None, loc); + tmp = Py_BuildValue("(zlOO)", filename, lineno, Py_None, loc); Py_DECREF(loc); if (!tmp) { Py_DECREF(errstr); @@ -261,7 +261,6 @@ /* Only a simple_stmt can contain multiple statements. */ REQ(n, simple_stmt); for (i = 0; i < NCH(n); i += 2) { - stmt_ty s; if (TYPE(CHILD(n, i)) == NEWLINE) break; s = ast_for_stmt(&c, CHILD(n, i)); @@ -1510,7 +1509,7 @@ return NULL; } - asdl_seq_SET(ops, i / 2, (void *)operator); + asdl_seq_SET(ops, i / 2, (void *)(Py_uintptr_t)operator); asdl_seq_SET(cmps, i / 2, expression); } expression = ast_for_expr(c, CHILD(n, 0)); @@ -2031,7 +2030,7 @@ return alias(NEW_IDENTIFIER(CHILD(n, 0)), NULL, c->c_arena); else { /* Create a string of the form "a.b.c" */ - int i, len; + size_t i, len; char *s; len = 0;
