diff options
Diffstat (limited to 'ext/misc/regexp.c')
-rw-r--r-- | ext/misc/regexp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/misc/regexp.c b/ext/misc/regexp.c index 7244d5299..b4a8ab5c0 100644 --- a/ext/misc/regexp.c +++ b/ext/misc/regexp.c @@ -136,7 +136,7 @@ struct ReCompiled { static void re_add_state(ReStateSet *pSet, int newState){ unsigned i; for(i=0; i<pSet->nState; i++) if( pSet->aState[i]==newState ) return; - pSet->aState[pSet->nState++] = newState; + pSet->aState[pSet->nState++] = (ReStateNumber)newState; } /* Extract the next unicode character from *pzIn and return it. Advance @@ -358,7 +358,7 @@ static int re_insert(ReCompiled *p, int iBefore, int op, int arg){ p->aArg[i] = p->aArg[i-1]; } p->nState++; - p->aOp[iBefore] = op; + p->aOp[iBefore] = (char)op; p->aArg[iBefore] = arg; return iBefore; } @@ -677,12 +677,12 @@ const char *re_compile(ReCompiled **ppRe, const char *zIn, int noCase){ for(j=0, i=1; j<sizeof(pRe->zInit)-2 && pRe->aOp[i]==RE_OP_MATCH; i++){ unsigned x = pRe->aArg[i]; if( x<=127 ){ - pRe->zInit[j++] = x; + pRe->zInit[j++] = (unsigned char)x; }else if( x<=0xfff ){ - pRe->zInit[j++] = 0xc0 | (x>>6); + pRe->zInit[j++] = (unsigned char)(0xc0 | (x>>6)); pRe->zInit[j++] = 0x80 | (x&0x3f); }else if( x<=0xffff ){ - pRe->zInit[j++] = 0xd0 | (x>>12); + pRe->zInit[j++] = (unsigned char)(0xd0 | (x>>12)); pRe->zInit[j++] = 0x80 | ((x>>6)&0x3f); pRe->zInit[j++] = 0x80 | (x&0x3f); }else{ |