summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-01-08 01:06:06 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-01-08 01:06:06 (GMT)
commit46b7bda9bcd0fb11878a154234c3064e19e35f3c (patch)
tree4d7e30ff3e17be4baeb7414d24825cf4923d168f /Python/ast.c
parentd39d861a36bf2ff7ccbb8248fa7fb81517923877 (diff)
downloadcpython-46b7bda9bcd0fb11878a154234c3064e19e35f3c.zip
cpython-46b7bda9bcd0fb11878a154234c3064e19e35f3c.tar.gz
cpython-46b7bda9bcd0fb11878a154234c3064e19e35f3c.tar.bz2
Fix icc warnings: conversion from "long" to "int" may lose significant bits
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/ast.c b/Python/ast.c
index bba599b..9b32f8b 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -78,7 +78,7 @@ static void
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 @@ ast_error_finish(const char *filename)
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 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename,
/* 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 @@ ast_for_expr(struct compiling *c, const node *n)
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 @@ alias_for_import_name(struct compiling *c, const node *n)
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;