diff options
author | QC <qball@gmpclient.org> | 2015-01-07 18:02:18 +0100 |
---|---|---|
committer | QC <qball@gmpclient.org> | 2015-01-07 18:02:18 +0100 |
commit | 366813fdecbba941be52128093356bc09451a6d3 (patch) | |
tree | 9b99f18f17cb8a20e48b286d49939a9d46822b84 | |
parent | 79909cd807784e463c21436112bf0936da32608b (diff) |
Wonder if this fixes the warning.
-rw-r--r-- | source/rofi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/rofi.c b/source/rofi.c index 32b59430..f017ba1b 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -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; } |