Fix compiler warnings (They were not reported, see next commit). The reset function declaration didn't match its name in the definition; the _defaults variant matches better with the rest. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated to current master.]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index cadc57f..45e98e4 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -224,7 +224,7 @@ xkb_context_include_path_append_default(struct xkb_context *context);
* could not be added.
*/
_X_EXPORT int
-xkb_context_include_path_reset(struct xkb_context *context);
+xkb_context_include_path_reset_defaults(struct xkb_context *context);
/**
* Removes all entries from the context's include path.
diff --git a/src/maprules.c b/src/maprules.c
index 8015b55..6a6e616 100644
--- a/src/maprules.c
+++ b/src/maprules.c
@@ -562,9 +562,8 @@ static void
FreeMultiDefs(XkbRF_MultiDefsPtr defs)
{
free(defs->options);
- /* Avoid -Wcast-qual warnings. */
- free((void *)(uintptr_t)defs->layout[1]);
- free((void *)(uintptr_t)defs->variant[1]);
+ free(UNCONSTIFY(defs->layout[1]));
+ free(UNCONSTIFY(defs->variant[1]));
}
static void
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 5548e5b..f8f5881 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -1941,9 +1941,8 @@ CopySymbolsDef(struct xkb_keymap * xkb, KeyInfo *key, int start_from)
unsigned width, tmp, nGroups;
struct xkb_key_type * type;
Bool haveActions, autoType, useAlias;
- xkb_atom_t types[XkbNumKbdGroups];
+ unsigned types[XkbNumKbdGroups];
union xkb_action *outActs;
-
unsigned int symIndex = 0;
useAlias = (start_from == 0);