aboutsummaryrefslogtreecommitdiff
path: root/src/test_regexp.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-03-01 23:40:26 +0000
committerdrh <drh@noemail.net>2013-03-01 23:40:26 +0000
commit1d59d036de87114adc03d48c4ba817cc21dc350b (patch)
tree93ba3d864c095458fa0bb4eb8538cab7b108f181 /src/test_regexp.c
parent1488052d385dd5ef0dc34543f1f83f7a723e9bd8 (diff)
downloadsqlite-1d59d036de87114adc03d48c4ba817cc21dc350b.tar.gz
sqlite-1d59d036de87114adc03d48c4ba817cc21dc350b.zip
Complete the initialization of the loadable extension thunk table. Also
fix other (harmless) compiler warnings. FossilOrigin-Name: 780d06c5e54590f677f993fa9c313989c2eab8c7
Diffstat (limited to 'src/test_regexp.c')
-rw-r--r--src/test_regexp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test_regexp.c b/src/test_regexp.c
index 2cebbea44..a1969ada4 100644
--- a/src/test_regexp.c
+++ b/src/test_regexp.c
@@ -107,7 +107,7 @@ struct ReCompiled {
char *aOp; /* Operators for the virtual machine */
int *aArg; /* Arguments to each operator */
unsigned (*xNextChar)(ReInput*); /* Next character function */
- char zInit[12]; /* Initial text to match */
+ unsigned char zInit[12]; /* Initial text to match */
int nInit; /* Number of characters in zInit */
unsigned nState; /* Number of entries in aOp[] and aArg[] */
unsigned nAlloc; /* Slots allocated for aOp[] and aArg[] */
@@ -194,7 +194,8 @@ int re_match(ReCompiled *pRe, const unsigned char *zIn, int nIn){
if( pRe->nInit ){
unsigned char x = pRe->zInit[0];
while( in.i+pRe->nInit<=in.mx
- && (zIn[in.i]!=x || strncmp(zIn+in.i, pRe->zInit, pRe->nInit)!=0)
+ && (zIn[in.i]!=x ||
+ strncmp((const char*)zIn+in.i, (const char*)pRe->zInit, pRe->nInit)!=0)
){
in.i++;
}