From 77fac879d25b6500d3bd028a8e855fc9dc789634 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Tue, 12 Apr 2016 20:05:06 +0000 Subject: More harmless compiler warning fixes. FossilOrigin-Name: ab69527c1608da0b668f3b49e967661dd99cc3d4 --- ext/misc/regexp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/misc/regexp.c') 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; inState; 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; jzInit)-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{ -- cgit v1.2.3