mirror of https://github.com/davatorium/rofi.git
Cleanups (cppcheck)
This commit is contained in:
parent
f05f0de583
commit
f0b1998703
|
@ -129,7 +129,6 @@ Color color_get ( const char *const name );
|
|||
void color_background ( cairo_t *d );
|
||||
void color_border ( cairo_t *d );
|
||||
void color_separator ( cairo_t *d );
|
||||
void color_cache_reset ( void );
|
||||
|
||||
void x11_helper_set_cairo_rgba ( cairo_t *d, Color col );
|
||||
/*@}*/
|
||||
|
|
|
@ -455,13 +455,13 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd )
|
|||
|
||||
if ( ( c = window_client ( w ) ) ) {
|
||||
// final line format
|
||||
unsigned int wmdesktop;
|
||||
char desktop[5];
|
||||
desktop[0] = 0;
|
||||
size_t len =
|
||||
( ( c->title != NULL ) ? strlen ( c->title ) : 0 ) + ( c->class ? strlen ( c->class ) : 0 ) + classfield + 50;
|
||||
char *line = g_malloc ( len );
|
||||
if ( !pd->config_i3_mode ) {
|
||||
unsigned int wmdesktop = 0;
|
||||
// find client's desktop.
|
||||
xcb_get_property_cookie_t cookie;
|
||||
xcb_get_property_reply_t *r;
|
||||
|
|
|
@ -579,7 +579,6 @@ int config_sanity_check ( void )
|
|||
}
|
||||
}
|
||||
|
||||
PangoFontDescription * pfd = NULL;
|
||||
if ( config.menu_font ) {
|
||||
PangoFontDescription *pfd = pango_font_description_from_string ( config.menu_font );
|
||||
const char *fam = pango_font_description_get_family ( pfd );
|
||||
|
|
|
@ -139,7 +139,7 @@ void i3_support_free_internals ( void )
|
|||
{
|
||||
}
|
||||
|
||||
int i3_support_initialize ( void )
|
||||
int i3_support_initialize ( G_GNUC_UNUSED xcb_stuff *xcb )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,16 @@
|
|||
// Pidfile.
|
||||
char *pidfile = NULL;
|
||||
const char *cache_dir = NULL;
|
||||
struct xkb_stuff xkb = { NULL };
|
||||
struct xkb_stuff xkb = {
|
||||
.xcb_connection = NULL,
|
||||
.context = NULL,
|
||||
.keymap = NULL,
|
||||
.state = NULL,
|
||||
.compose = {
|
||||
.table = NULL,
|
||||
.state = NULL
|
||||
}
|
||||
};
|
||||
char *config_path = NULL;
|
||||
// Array of modi.
|
||||
Mode **modi = NULL;
|
||||
|
@ -378,7 +387,6 @@ static int add_mode ( const char * token )
|
|||
else{
|
||||
// Report error, don't continue.
|
||||
fprintf ( stderr, "Invalid script switcher: %s\n", token );
|
||||
token = NULL;
|
||||
}
|
||||
}
|
||||
return ( index == num_modi ) ? -1 : (int) index;
|
||||
|
|
|
@ -354,6 +354,7 @@ static unsigned int x11_find_mod_mask ( xkb_stuff *xkb, ... )
|
|||
mask |= 1 << i;
|
||||
}
|
||||
}
|
||||
va_end ( names );
|
||||
return mask;
|
||||
}
|
||||
|
||||
|
@ -613,12 +614,6 @@ static struct
|
|||
unsigned int set;
|
||||
} color_cache[3];
|
||||
|
||||
void color_cache_reset ( void )
|
||||
{
|
||||
color_cache[BACKGROUND].set = FALSE;
|
||||
color_cache[BORDER].set = FALSE;
|
||||
color_cache[SEPARATOR].set = FALSE;
|
||||
}
|
||||
void color_background ( cairo_t *d )
|
||||
{
|
||||
if ( !color_cache[BACKGROUND].set ) {
|
||||
|
|
Loading…
Reference in New Issue