mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-17 15:45:56 -05:00
Fix some warning that converity scan picked up.
This commit is contained in:
parent
898b5466f0
commit
b227fece10
2 changed files with 8 additions and 2 deletions
|
@ -678,6 +678,10 @@ char *rofi_expand_path ( const char *input )
|
||||||
|
|
||||||
unsigned int levenshtein ( const char *needle, const glong needlelen, const char *haystack, const glong haystacklen )
|
unsigned int levenshtein ( const char *needle, const glong needlelen, const char *haystack, const glong haystacklen )
|
||||||
{
|
{
|
||||||
|
if ( needlelen == G_MAXLONG ){
|
||||||
|
// String to long, we cannot handle this.
|
||||||
|
return UINT_MAX;
|
||||||
|
}
|
||||||
unsigned int column[needlelen + 1];
|
unsigned int column[needlelen + 1];
|
||||||
for ( glong y = 0; y <= needlelen; y++ ) {
|
for ( glong y = 0; y <= needlelen; y++ ) {
|
||||||
column[y] = y;
|
column[y] = y;
|
||||||
|
|
|
@ -238,8 +238,10 @@ static void rofi_theme_print_index ( ThemeWidget *widget )
|
||||||
}
|
}
|
||||||
void rofi_theme_print ( ThemeWidget *widget )
|
void rofi_theme_print ( ThemeWidget *widget )
|
||||||
{
|
{
|
||||||
|
if ( widget != NULL ) {
|
||||||
rofi_theme_print_index ( widget );
|
rofi_theme_print_index ( widget );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main lex parser.
|
* Main lex parser.
|
||||||
|
@ -382,7 +384,7 @@ Property *rofi_theme_find_property ( ThemeWidget *widget, PropertyType type, con
|
||||||
// Resolve link.
|
// Resolve link.
|
||||||
rofi_theme_resolve_link_property ( p, 0 );
|
rofi_theme_resolve_link_property ( p, 0 );
|
||||||
}
|
}
|
||||||
if ( p->value.link.ref->type == type ) {
|
if ( p->value.link.ref != NULL && p->value.link.ref->type == type ) {
|
||||||
return p->value.link.ref;
|
return p->value.link.ref;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue