mirror of
https://github.com/davatorium/rofi.git
synced 2025-04-14 17:43:01 -04:00
Wonder if this fixes the warning.
This commit is contained in:
parent
79909cd807
commit
366813fdec
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue