Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10162
-gerrit
commit 81b311c56fb3e3c6bef119605c70ff11142a3f89 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Sat May 9 08:06:02 2015 +0300
cbfstool: Fix fmd_scanner build compatibility
Fixes these errors: error: declaration of ‘input’ shadows a global declaration [-Werror=shadow] error: redundant redeclaration of ‘isatty’ [-Werror=redundant-decls]
Change-Id: I4563d36e5389db4fdc5be3ca4e0e88af2642f7f8 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- util/cbfstool/Makefile | 3 ++- util/cbfstool/fmd_scanner.l | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile index 4238445..0687be9 100644 --- a/util/cbfstool/Makefile +++ b/util/cbfstool/Makefile @@ -93,8 +93,9 @@ $(FMAPTESTS_BINARY): $(FMAPTESTS_COMMON)
# Yacc source is superset of header $(obj)/fmd_parser.o: CFLAGS += -Wno-redundant-decls -# Lex generates unneeded functions +# Lex generates unneeded functions and declarations $(obj)/fmd_scanner.o: CFLAGS += -Wno-unused-function +$(obj)/fmd_scanner.o: CFLAGS += -Wno-redundant-decls # Tolerate lzma sdk warnings $(obj)/lzma/C/LzmaEnc.o: CFLAGS += -Wno-sign-compare -Wno-cast-qual
diff --git a/util/cbfstool/fmd_scanner.l b/util/cbfstool/fmd_scanner.l index d2cc43d..0a58210 100644 --- a/util/cbfstool/fmd_scanner.l +++ b/util/cbfstool/fmd_scanner.l @@ -23,8 +23,8 @@ #include <assert.h> #include <string.h>
-int parse_integer(char *input, int base); -int copy_string(const char *input); +int parse_integer(char *src, int base); +int copy_string(const char *src); %}
%option noyywrap @@ -44,10 +44,10 @@ MULTIPLIER [KMG]
%%
-int parse_integer(char *input, int base) +int parse_integer(char *src, int base) { char *multiplier = NULL; - unsigned val = strtoul(input, &multiplier, base); + unsigned val = strtoul(src, &multiplier, base);
if (*multiplier) { switch(*multiplier) { @@ -71,8 +71,8 @@ int parse_integer(char *input, int base) return INTEGER; }
-int copy_string(const char *input) +int copy_string(const char *src) { - yylval.strval = strdup(input); + yylval.strval = strdup(src); return STRING; }