summaryrefslogtreecommitdiff
path: root/examples/c/reccalc/scan.l
diff options
context:
space:
mode:
Diffstat (limited to 'examples/c/reccalc/scan.l')
-rw-r--r--examples/c/reccalc/scan.l4
1 files changed, 2 insertions, 2 deletions
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)