Fix more compiler warning

This commit is contained in:
Dave Davenport 2017-05-04 07:56:40 +02:00
parent dbf551ec15
commit cc714f8f91
3 changed files with 4 additions and 2 deletions

View File

@ -442,6 +442,7 @@ gboolean rofi_theme_is_empty ( void );
* Convert old theme colors into default one.
*/
void rofi_theme_convert_old ( void );
#endif
/**
* @param file File name passed to option.
@ -450,4 +451,3 @@ void rofi_theme_convert_old ( void );
*/
char *helper_get_theme_path ( const char *file );
#endif
#endif

View File

@ -37,6 +37,7 @@
#include <gio/gio.h>
#include <helper.h>
#include "rofi.h"
#include "theme.h"
#include "lexer/theme-parser.h"

View File

@ -134,7 +134,8 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, TextBoxFontType
tbfc->pfd = pango_font_description_from_string ( font );
if ( helper_validate_font ( tbfc->pfd, font ) ) {
tbfc->metrics = pango_context_get_metrics ( p_context, tbfc->pfd, NULL );
g_hash_table_insert ( tbfc_cache, font, tbfc );
// Cast away consts. (*yuck*) because table_insert does not know it is const.
g_hash_table_insert ( tbfc_cache, (char *)font, tbfc );
}
else {
pango_font_description_free ( tbfc->pfd );