parser: don't shadow "str" It's a name of a function in scanner-utils.h and also of some parameters. https://bugs.freedesktop.org/show_bug.cgi?id=79898 Reported-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Ran Benita <ran234@gmail.com>
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
diff --git a/src/xkbcomp/parser-priv.h b/src/xkbcomp/parser-priv.h
index 0675e55..76b5047 100644
--- a/src/xkbcomp/parser-priv.h
+++ b/src/xkbcomp/parser-priv.h
@@ -28,8 +28,8 @@
#define XKBCOMP_PARSER_PRIV_H
struct parser_param;
+struct scanner;
-#include "scanner-utils.h"
#include "parser.h"
int
diff --git a/src/xkbcomp/parser.y b/src/xkbcomp/parser.y
index 521168d..ad1a27b 100644
--- a/src/xkbcomp/parser.y
+++ b/src/xkbcomp/parser.y
@@ -34,6 +34,7 @@
#include "xkbcomp-priv.h"
#include "ast-build.h"
#include "parser-priv.h"
+#include "scanner-utils.h"
struct parser_param {
struct xkb_context *ctx;
@@ -55,21 +56,21 @@ _xkbcommon_error(struct parser_param *param, const char *msg)
}
static bool
-resolve_keysym(const char *str, xkb_keysym_t *sym_rtrn)
+resolve_keysym(const char *name, xkb_keysym_t *sym_rtrn)
{
xkb_keysym_t sym;
- if (!str || istreq(str, "any") || istreq(str, "nosymbol")) {
+ if (!name || istreq(name, "any") || istreq(name, "nosymbol")) {
*sym_rtrn = XKB_KEY_NoSymbol;
return true;
}
- if (istreq(str, "none") || istreq(str, "voidsymbol")) {
+ if (istreq(name, "none") || istreq(name, "voidsymbol")) {
*sym_rtrn = XKB_KEY_VoidSymbol;
return true;
}
- sym = xkb_keysym_from_name(str, XKB_KEYSYM_NO_FLAGS);
+ sym = xkb_keysym_from_name(name, XKB_KEYSYM_NO_FLAGS);
if (sym != XKB_KEY_NoSymbol) {
*sym_rtrn = sym;
return true;
diff --git a/src/xkbcomp/scanner.c b/src/xkbcomp/scanner.c
index 9f200bb..06eb653 100644
--- a/src/xkbcomp/scanner.c
+++ b/src/xkbcomp/scanner.c
@@ -23,6 +23,7 @@
#include "xkbcomp-priv.h"
#include "parser-priv.h"
+#include "scanner-utils.h"
static bool
number(struct scanner *s, int64_t *out, int *out_tok)