rules: quiet a gcc warning
src/xkbcomp/rules.c:620:36: error: 'idx' may be used uninitialized in this function [-Werror=maybe-uninitialized] Can't happen but no harm done. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
559252a1a8
commit
0e200bd507
|
@ -555,6 +555,7 @@ static int
|
|||
extract_layout_index(const char *s, size_t max_len, xkb_layout_index_t *out)
|
||||
{
|
||||
/* This function is pretty stupid, but works for now. */
|
||||
*out = XKB_LAYOUT_INVALID;
|
||||
if (max_len < 3)
|
||||
return -1;
|
||||
if (s[0] != '[' || !isdigit(s[1]) || s[2] != ']')
|
||||
|
|
Loading…
Reference in New Issue