#define __container_of(ptr, sample, member) \
(void *)((char *)(ptr) \
- - ((char *)&(sample)->member - (char *)(sample)))
+ - offsetof(__typeof(*sample), member))
/**
* Loop through the list given by head and set pos to struct in the list.
*
#include "xkbcomp-priv.h"
#include "parseutils.h"
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+
extern int yylex(union YYSTYPE *val, struct YYLTYPE *loc, void *scanner);
#define scanner param->scanner
#include <stdio.h>
#include "xkbcomp-priv.h"
-#include "parser.h"
struct parser_param {
struct xkb_context *ctx;
XkbFile *rtrn;
};
+#include "parser.h"
+
struct scanner_extra {
char *scanFile;
char scanBuf[1024];
#include "xkbcomp-priv.h"
#include "parseutils.h"
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC diagnostic ignored "-Wmissing-noreturn"
+
extern int yyparse(struct parser_param *param);
#define YY_USER_ACTION { \
{
xkb_group_index_t ndx;
size_t nSyms, nLevels;
- size_t i, j;
+ size_t i;
+ int j;
if (!GetGroupIndex(keyi, keymap, arrayNdx, SYMBOLS, &ndx))
return false;
defined = keyi->symsDefined | keyi->actsDefined | keyi->typesDefined;
/* get highest group number */
- for (i = XkbNumKbdGroups - 1; i >= 0; i--) {
+ for (i = XkbNumKbdGroups - 1; i > 0; i--) {
if (defined & (1 << i))
break;
}