* data/skeletons/glr.c (yysplitStack): Pacify Clang 8.

This commit is contained in:
Paul Eggert
2019-10-05 03:41:53 -07:00
parent 8f5aaa0e04
commit e69b47cd18

View File

@@ -1506,7 +1506,8 @@ yysplitStack (yyGLRStack* yystackp, ptrdiff_t yyk)
{
yyGLRState** yynewStates = YY_NULLPTR;
yybool* yynewLookaheadNeeds;
ptrdiff_t half_max_capacity = YYSIZEMAX / (2 * sizeof yynewStates[0]);
ptrdiff_t state_size = sizeof yynewStates[0];
ptrdiff_t half_max_capacity = YYSIZEMAX / 2 / state_size;
if (half_max_capacity < yystackp->yytops.yycapacity)
yyMemoryExhausted (yystackp);