diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-12-15 09:17:39 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-12-15 09:17:39 +0100 |
commit | d7b5b9fbfa921a4b7d8893b86d0aa1df4362ca20 (patch) | |
tree | cdb8426a115380ad913dfb08401633071992d41a | |
parent | 9b16f21ddced74e7713226f50843beb1bf6ef00a (diff) |
Fix some compile warnings
-rw-r--r-- | source/rofi.c | 2 | ||||
-rw-r--r-- | source/widgets/scrollbar.c | 6 | ||||
-rw-r--r-- | source/x11-helper.c | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/source/rofi.c b/source/rofi.c index 69bdc22a..7a127eff 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -535,7 +535,7 @@ static gboolean main_loop_x11_event_handler ( xcb_generic_event_t *ev, G_GNUC_UN // Because of abe_trigger, state of rofi can be changed. handle this! // Run mainloop on dummy event. - xcb_generic_event_t dev = {0,}; + xcb_generic_event_t dev; dev.response_type = 0; main_loop_x11_event_handler_view ( &dev ); } diff --git a/source/widgets/scrollbar.c b/source/widgets/scrollbar.c index 759528b6..9314e7cd 100644 --- a/source/widgets/scrollbar.c +++ b/source/widgets/scrollbar.c @@ -127,10 +127,10 @@ unsigned int scrollbar_clicked ( const scrollbar *sb, int y ) { if ( sb != NULL ) { if ( y >= sb->widget.y && y <= ( sb->widget.y + sb->widget.h ) ) { - unsigned int r = ( sb->length * sb->widget.h ) / ( (double) ( sb->length + sb->pos_length ) ); - unsigned int handle = sb->widget.h - r; + short r = ( sb->length * sb->widget.h ) / ( (double) ( sb->length + sb->pos_length ) ); + short handle = sb->widget.h - r; double sec = ( ( r ) / (double) ( sb->length - 1 ) ); - unsigned int half_handle = handle / 2; + short half_handle = handle / 2; y -= sb->widget.y + half_handle; y = MIN ( MAX ( 0, y ), sb->widget.h - 2 * half_handle ); diff --git a/source/x11-helper.c b/source/x11-helper.c index 20894a17..149becba 100644 --- a/source/x11-helper.c +++ b/source/x11-helper.c @@ -640,15 +640,13 @@ gboolean x11_parse_key ( const char *combo, unsigned int *mod, xkb_keysym_t *key char *mod_key = input_key; char *error_msg = NULL; unsigned int modmask = 0; + xkb_keysym_t sym = XKB_KEY_NoSymbol; // Test if this works on release. if ( g_str_has_prefix ( mod_key, "!" ) ) { ++mod_key; *release = TRUE; } - char *saveptr = NULL; - xkb_keysym_t sym = XKB_KEY_NoSymbol; - char **entries = g_strsplit_set ( mod_key, "+-", -1); for ( int i = 0; entries && entries[i]; i++ ) { char *entry = entries[i]; |