From 89ec6dd6bc5daa8c67c75e836c613a71d8d6a486 Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 27 Jan 2020 14:42:34 +0100 Subject: matekbd-keyboard-config: Value stored to 'clen' is never read --- libmatekbd/matekbd-keyboard-config.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libmatekbd/matekbd-keyboard-config.c b/libmatekbd/matekbd-keyboard-config.c index 40b4022..7338e28 100644 --- a/libmatekbd/matekbd-keyboard-config.c +++ b/libmatekbd/matekbd-keyboard-config.c @@ -153,7 +153,7 @@ matekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent, { static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH]; static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH]; - int plen, clen; + int plen; const gchar *pos; *parent = *child = NULL; @@ -163,11 +163,9 @@ matekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent, pos = strchr (merged, '\t'); if (pos == NULL) { plen = strlen (merged); - clen = 0; } else { plen = pos - merged; - clen = strlen (pos + 1); - if (clen >= XKL_MAX_CI_NAME_LENGTH) + if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH) return FALSE; strcpy (*child = cbuffer, pos + 1); } -- cgit v1.2.1