From f5e9045c3ff1083695beb8da19277241bd50f8e2 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Mon, 10 Aug 2015 11:48:46 +0100 Subject: [PATCH] Yet one more explicit cast of pointer difference to uint32_t. Much the same as previous commit: array of length bounded with 32 bits, first pointer points to some random element. second pointer points to the beginning of array (unless there were some errors in calculatins that would have likely crashed re2c anyway). Fixes [-Wconversion] warning. --- re2c/src/ir/bytecode/bytecode.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/re2c/src/ir/bytecode/bytecode.cc b/re2c/src/ir/bytecode/bytecode.cc index afbb7668..a14b2d58 100644 --- a/re2c/src/ir/bytecode/bytecode.cc +++ b/re2c/src/ir/bytecode/bytecode.cc @@ -20,7 +20,7 @@ smart_ptr genCode (RegExp *re, Output & output, uint32_t ind, const std::st if (!cs.rep[j]->nxt) cs.rep[j]->nxt = &cs.ptn[j]; - rep[j] = cs.rep[j]->nxt - &cs.ptn[0]; + rep[j] = static_cast (cs.rep[j]->nxt - &cs.ptn[0]); } re->calcSize(rep); -- 2.40.0