Wonder if this fixes the warning.

This commit is contained in:
QC 2015-01-07 18:02:18 +01:00
parent 79909cd807
commit 366813fdec
1 changed files with 4 additions and 3 deletions

View File

@ -762,10 +762,11 @@ static int dist ( const char *s, const char *t, int *d, int ls, int lt, int i, i
}
static int levenshtein ( const char *s, const char *t )
{
int ls = strlen ( s ), lt = strlen ( t );
int d[( ls + 1 ) * ( lt + 1 )];
int ls = strlen ( s ), lt = strlen ( t );
ssize_t array_length = ( ls + 1 ) * ( lt + 1 );
int d[array_length];
for ( int i = 0; i < ( ( ls + 1 ) * ( lt + 1 ) ); i++ ) {
for ( ssize_t i = 0; i < array_length; i++ ) {
d[i] = -1;
}