From 6ea15719d1859f0ff7e5bbfe361850c381776683 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 8 Feb 2014 01:26:35 +0200 Subject: [PATCH] ast: use more suitable types in a few ast nodes The int ones cannot be signed (they come as such from the scanner, and NEGATE is never applied to them). The uint32_t one is really an atom, but presumably the type was never converted to xkb_atom_t. Signed-off-by: Ran Benita --- src/xkbcomp/ast-build.c | 6 +++--- src/xkbcomp/ast-build.h | 6 +++--- src/xkbcomp/ast.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/xkbcomp/ast-build.c b/src/xkbcomp/ast-build.c index d470884..77cffab 100644 --- a/src/xkbcomp/ast-build.c +++ b/src/xkbcomp/ast-build.c @@ -356,7 +356,7 @@ SymbolsCreate(xkb_atom_t keyName, VarDef *symbols) } GroupCompatDef * -GroupCompatCreate(int group, ExprDef *val) +GroupCompatCreate(unsigned group, ExprDef *val) { GroupCompatDef *def = malloc(sizeof(*def)); if (!def) @@ -372,7 +372,7 @@ GroupCompatCreate(int group, ExprDef *val) } ModMapDef * -ModMapCreate(uint32_t modifier, ExprDef *keys) +ModMapCreate(xkb_atom_t modifier, ExprDef *keys) { ModMapDef *def = malloc(sizeof(*def)); if (!def) @@ -404,7 +404,7 @@ LedMapCreate(xkb_atom_t name, VarDef *body) } LedNameDef * -LedNameCreate(int ndx, ExprDef *name, bool virtual) +LedNameCreate(unsigned ndx, ExprDef *name, bool virtual) { LedNameDef *def = malloc(sizeof(*def)); if (!def) diff --git a/src/xkbcomp/ast-build.h b/src/xkbcomp/ast-build.h index 8146b06..f305c4c 100644 --- a/src/xkbcomp/ast-build.h +++ b/src/xkbcomp/ast-build.h @@ -98,16 +98,16 @@ SymbolsDef * SymbolsCreate(xkb_atom_t keyName, VarDef *symbols); GroupCompatDef * -GroupCompatCreate(int group, ExprDef *def); +GroupCompatCreate(unsigned group, ExprDef *def); ModMapDef * -ModMapCreate(uint32_t modifier, ExprDef *keys); +ModMapCreate(xkb_atom_t modifier, ExprDef *keys); LedMapDef * LedMapCreate(xkb_atom_t name, VarDef *body); LedNameDef * -LedNameCreate(int ndx, ExprDef *name, bool virtual); +LedNameCreate(unsigned ndx, ExprDef *name, bool virtual); IncludeStmt * IncludeCreate(struct xkb_context *ctx, char *str, enum merge_mode merge); diff --git a/src/xkbcomp/ast.h b/src/xkbcomp/ast.h index d6b1109..a141b8f 100644 --- a/src/xkbcomp/ast.h +++ b/src/xkbcomp/ast.h @@ -299,7 +299,7 @@ typedef struct { typedef struct { ParseCommon common; enum merge_mode merge; - int group; + unsigned group; ExprDef *def; } GroupCompatDef; @@ -314,7 +314,7 @@ typedef struct { typedef struct { ParseCommon common; enum merge_mode merge; - int ndx; + unsigned ndx; ExprDef *name; bool virtual; } LedNameDef; -- 2.7.4