diff options
Diffstat (limited to 'examples/c/reccalc')
-rw-r--r-- | examples/c/reccalc/local.mk | 2 | ||||
-rw-r--r-- | examples/c/reccalc/scan.l | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/c/reccalc/local.mk b/examples/c/reccalc/local.mk index 0538f120..41a12828 100644 --- a/examples/c/reccalc/local.mk +++ b/examples/c/reccalc/local.mk @@ -26,6 +26,8 @@ if FLEX_WORKS BUILT_SOURCES += $(nodist_%C%_reccalc_SOURCES) # Don't use gnulib's system headers. %C%_reccalc_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D% + # Fighting warnings triggered by Flex is just too painful. + # %C%_reccalc_CFLAGS = $(TEST_CFLAGS) endif FLEX_WORKS %D%/parse.c: $(dependencies) diff --git a/examples/c/reccalc/scan.l b/examples/c/reccalc/scan.l index 0bf5210c..45d70d3b 100644 --- a/examples/c/reccalc/scan.l +++ b/examples/c/reccalc/scan.l @@ -32,9 +32,9 @@ do \ capacity = capacity ? 2 * capacity : 128; \ while (capacity < size + yyleng + 1); \ - str = realloc (str, capacity); \ + str = realloc (str, (size_t) capacity); \ } \ - memcpy (str + size, yytext, yyleng); \ + memcpy (str + size, yytext, (size_t) yyleng); \ size += yyleng; \ assert (size < capacity); \ } while (0) |