summaryrefslogtreecommitdiffstats
path: root/dimension/directives.rules
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-05-05 20:09:38 -0600
committerTavian Barnes <tavianator@gmail.com>2010-05-05 22:47:44 -0600
commit6c2943e735c99579b5b861f67f2d98e5ddd6306f (patch)
treee882a1dda2726dd9dfca3fe2dd44750b17b1edda /dimension/directives.rules
parentb14506e501770aeaf54d1160c0073398cc29a038 (diff)
downloaddimension-6c2943e735c99579b5b861f67f2d98e5ddd6306f.tar.xz
Use C99 for loop initializers.
Diffstat (limited to 'dimension/directives.rules')
-rw-r--r--dimension/directives.rules9
1 files changed, 4 insertions, 5 deletions
diff --git a/dimension/directives.rules b/dimension/directives.rules
index e199fe3..84358f6 100644
--- a/dimension/directives.rules
+++ b/dimension/directives.rules
@@ -77,19 +77,18 @@ LANGUAGE_DIRECTIVE: "#include" STRING {
"Attempt to expand non-macro.");
dmnsn_delete_astnode($1);
- unsigned int nparams = dmnsn_array_size(node->children);
- unsigned int nparams_given = dmnsn_array_size($3.children);
+ size_t nparams = dmnsn_array_size(node->children);
+ size_t nparams_given = dmnsn_array_size($3.children);
if (nparams_given != nparams) {
dmnsn_diagnostic(@$, "wrong number of macro arguments"
- " (%u; should be %u)",
+ " (%zu; should be %zu)",
nparams_given, nparams);
dmnsn_delete_astnode($3);
YYERROR;
}
- unsigned int i;
- for (i = 0; i < nparams; ++i) {
+ for (size_t i = 0; i < nparams; ++i) {
dmnsn_astnode id, param;
dmnsn_array_get(node->children, i, &id);
dmnsn_array_get($3.children, i, &param);