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>
master
Ran Benita 2014-06-30 14:52:30 +03:00
parent 9c30d6da4e
commit cb4bae714e
3 changed files with 7 additions and 5 deletions

View File

@ -28,8 +28,8 @@
#define XKBCOMP_PARSER_PRIV_H
struct parser_param;
struct scanner;
#include "scanner-utils.h"
#include "parser.h"
int

View File

@ -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;

View File

@ -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)