mirror of
https://github.com/davatorium/rofi.git
synced 2025-01-27 15:25:24 -05:00
Coverity annoyance.
This commit is contained in:
parent
1e8c94eaab
commit
e3cef1b8a9
1 changed files with 6 additions and 4 deletions
|
@ -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 )
|
||||
{
|
||||
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];
|
||||
|
||||
for ( ssize_t i = 0; i < array_length; i++ ) {
|
||||
for ( size_t i = 0; i < array_length; i++ ) {
|
||||
d[i] = -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue