aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/regexp.c
diff options
context:
space:
mode:
authormistachkin <mistachkin@noemail.net>2016-04-12 20:05:06 +0000
committermistachkin <mistachkin@noemail.net>2016-04-12 20:05:06 +0000
commit77fac879d25b6500d3bd028a8e855fc9dc789634 (patch)
tree8afdf9e232e8858a52c7f8a6e2426b0f3f80117e /ext/misc/regexp.c
parent02267cc2136bc3cde2ae9cc3a02f91e2dc497793 (diff)
downloadsqlite-77fac879d25b6500d3bd028a8e855fc9dc789634.tar.gz
sqlite-77fac879d25b6500d3bd028a8e855fc9dc789634.zip
More harmless compiler warning fixes.
FossilOrigin-Name: ab69527c1608da0b668f3b49e967661dd99cc3d4
Diffstat (limited to 'ext/misc/regexp.c')
-rw-r--r--ext/misc/regexp.c10
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{