summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dfa.c8
-rw-r--r--src/parse.y2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/dfa.c b/src/dfa.c
index 4473ce9..be62da8 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -154,7 +154,7 @@ void dump_associated_rules (FILE *file, int ds)
}
}
- qsort (&rule_set [1], num_associated_rules, sizeof (rule_set [1]), intcmp);
+ qsort (&rule_set [1], (size_t) num_associated_rules, sizeof (rule_set [1]), intcmp);
fprintf (file, _(" associated rule line numbers:"));
@@ -823,7 +823,7 @@ int snstods (int sns[], int numstates, int accset[], int nacc, int hashval, int
/* We sort the states in sns so we
* can compare it to oldsns quickly.
*/
- qsort (&sns [1], numstates, sizeof (sns [1]), intcmp);
+ qsort (&sns [1], (size_t) numstates, sizeof (sns [1]), intcmp);
didsort = 1;
}
@@ -858,7 +858,7 @@ int snstods (int sns[], int numstates, int accset[], int nacc, int hashval, int
*/
if (!didsort)
- qsort (&sns [1], numstates, sizeof (sns [1]), intcmp);
+ qsort (&sns [1], (size_t) numstates, sizeof (sns [1]), intcmp);
for (i = 1; i <= numstates; ++i)
dss[newds][i] = sns[i];
@@ -881,7 +881,7 @@ int snstods (int sns[], int numstates, int accset[], int nacc, int hashval, int
* match in the event of ties will work.
*/
- qsort (&accset [1], nacc, sizeof (accset [1]), intcmp);
+ qsort (&accset [1], (size_t) nacc, sizeof (accset [1]), intcmp);
dfaacc[newds].dfaacc_set =
allocate_integer_array (nacc + 1);
diff --git a/src/parse.y b/src/parse.y
index c28d5bb..ffe3c73 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -725,7 +725,7 @@ singleton : singleton '*'
{
/* Sort characters for fast searching.
*/
- qsort( ccltbl + cclmap[$1], ccllen[$1], sizeof (*ccltbl), cclcmp );
+ qsort( ccltbl + cclmap[$1], (size_t) ccllen[$1], sizeof (*ccltbl), cclcmp );
if ( useecs )
mkeccl( ccltbl + cclmap[$1], ccllen[$1],