summaryrefslogtreecommitdiffstats
path: root/dimension/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-11 20:43:39 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-11 20:43:39 -0500
commit58e72047f53213e010d649cc220f63b2dce07134 (patch)
tree4a8b903834c9451b0f5f35d5ea40b67b9e21ac00 /dimension/parse.c
parentcf4f6e6da179114b3d7cfc564889401485b57fdf (diff)
downloaddimension-58e72047f53213e010d649cc220f63b2dce07134.tar.xz
Add printf-style warnings to dmnsn_diagnostic, and fix bugs it found.
Diffstat (limited to 'dimension/parse.c')
-rw-r--r--dimension/parse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dimension/parse.c b/dimension/parse.c
index 6ca6326..ac74568 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -443,7 +443,8 @@ dmnsn_eval_unary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
"expected %s, %s, or %s; found %s",
dmnsn_astnode_string(DMNSN_AST_INTEGER),
dmnsn_astnode_string(DMNSN_AST_FLOAT),
- dmnsn_astnode_string(DMNSN_AST_VECTOR));
+ dmnsn_astnode_string(DMNSN_AST_VECTOR),
+ dmnsn_astnode_string(rhs.type));
ret = dmnsn_copy_astnode(astnode);
ret.type = DMNSN_AST_NONE;
}
@@ -811,7 +812,7 @@ dmnsn_eval(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
return dmnsn_eval(*symbol, symtable);
} else {
dmnsn_diagnostic(astnode.filename, astnode.line, astnode.col,
- "Unbound identifier '%s'", astnode.ptr);
+ "Unbound identifier '%s'", (const char *)astnode.ptr);
dmnsn_astnode error = dmnsn_new_astnode(DMNSN_AST_NONE);
++*error.refcount;
return error;