1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-01-27 15:25:24 -05:00

Coverity annoyance.

This commit is contained in:
QC 2015-01-07 22:11:12 +01:00
parent 1e8c94eaab
commit e3cef1b8a9

View file

@ -781,10 +781,12 @@ 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 ) static int levenshtein ( const char *s, const char *t )
{ {
int ls = strlen ( s ), lt = strlen ( t ); int ls = strlen ( s ), lt = strlen ( t );
ssize_t array_length = ( ls + 1 ) * ( lt + 1 ); size_t array_length = ( ls + 1 ) * ( lt + 1 );
// For some reason Coverity does not get that I initialize the
// array in for loop.
int d[array_length]; int d[array_length];
for ( ssize_t i = 0; i < array_length; i++ ) { for ( size_t i = 0; i < array_length; i++ ) {
d[i] = -1; d[i] = -1;
} }