From: Ulya Trofimovich Date: Mon, 10 Aug 2015 10:48:46 +0000 (+0100) Subject: Yet one more explicit cast of pointer difference to uint32_t. X-Git-Tag: 0.15~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5e9045c3ff1083695beb8da19277241bd50f8e2;p=re2c 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. --- 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);