From 9afa7682f6c22980eaebf15520723370a2777fc6 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 28 Apr 2017 09:15:01 +0200 Subject: [PATCH] Fix some small warning because get_string returns const. --- source/rofi.c | 2 +- source/view.c | 4 ++-- source/widgets/textbox.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/rofi.c b/source/rofi.c index 5fe0fbb9..5ca16ff9 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -908,7 +908,7 @@ static gboolean startup ( G_GNUC_UNUSED gpointer data ) return G_SOURCE_REMOVE; } -static gboolean record ( void ) +static gboolean record ( G_GNUC_UNUSED void *data ) { rofi_capture_screenshot (); return G_SOURCE_CONTINUE; diff --git a/source/view.c b/source/view.c index a4e6c9ac..3186c873 100644 --- a/source/view.c +++ b/source/view.c @@ -710,7 +710,7 @@ void __create_window ( MenuFlags menu_flags ) // Setup font. // Dummy widget. container *win = container_create ( "window.box" ); - char *font = rofi_theme_get_string ( WIDGET ( win ), "font", config.menu_font ); + const char *font = rofi_theme_get_string ( WIDGET ( win ), "font", config.menu_font ); if ( font ) { PangoFontDescription *pfd = pango_font_description_from_string ( font ); if ( helper_validate_font ( pfd, font ) ) { @@ -759,7 +759,7 @@ void __create_window ( MenuFlags menu_flags ) xcb_icccm_set_wm_class ( xcb->connection, box, sizeof ( wm_class_name ), wm_class_name ); TICK_N ( "setup window name and class" ); - char *transparency = rofi_theme_get_string ( WIDGET ( win ), "transparency", NULL ); + const char *transparency = rofi_theme_get_string ( WIDGET ( win ), "transparency", NULL ); if ( transparency ) { rofi_view_setup_fake_transparency ( transparency ); } diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index db9ec7c8..8c118baa 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -126,7 +126,7 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, TextBoxFontType textbox_font ( tb, tbft ); tb->metrics = p_metrics; - char * font = rofi_theme_get_string ( WIDGET ( tb ), "font", NULL ); + const char * font = rofi_theme_get_string ( WIDGET ( tb ), "font", NULL ); if ( font ) { TBFontConfig *tbfc = g_hash_table_lookup ( tbfc_cache, font ); if ( tbfc == NULL ) {