Fix some compiler warnings caused by signed/unsigned pointer conversions.

FossilOrigin-Name: cccee7b5b1e84523f1c549d3052fd170e32bde80
This commit is contained in:
dan 2015-03-07 15:46:41 +00:00
parent 6f876c339d
commit 92faed663a
5 changed files with 23 additions and 23 deletions

View File

@ -396,7 +396,7 @@ int sqlite3Fts5HashIterate(
int sqlite3Fts5HashQuery(
Fts5Hash*, /* Hash table to query */
const char *pTerm, int nTerm, /* Query term */
const char **ppDoclist, /* OUT: Pointer to doclist for pTerm */
const u8 **ppDoclist, /* OUT: Pointer to doclist for pTerm */
int *pnDoclist /* OUT: Size of doclist in bytes */
);
@ -408,7 +408,7 @@ void sqlite3Fts5HashScanNext(Fts5Hash*);
int sqlite3Fts5HashScanEof(Fts5Hash*);
void sqlite3Fts5HashScanEntry(Fts5Hash *,
const char **pzTerm, /* OUT: term (nul-terminated) */
const char **ppDoclist, /* OUT: pointer to doclist */
const u8 **ppDoclist, /* OUT: pointer to doclist */
int *pnDoclist /* OUT: size of doclist in bytes */
);

View File

@ -380,7 +380,7 @@ static int fts5HashEntrySort(
int sqlite3Fts5HashQuery(
Fts5Hash *pHash, /* Hash table to query */
const char *pTerm, int nTerm, /* Query term */
const char **ppDoclist, /* OUT: Pointer to doclist for pTerm */
const u8 **ppDoclist, /* OUT: Pointer to doclist for pTerm */
int *pnDoclist /* OUT: Size of doclist in bytes */
){
unsigned int iHash = fts5HashKey(pHash->nSlot, pTerm, nTerm);
@ -392,7 +392,7 @@ int sqlite3Fts5HashQuery(
if( p ){
fts5HashAddPoslistSize(p);
*ppDoclist = &p->zKey[nTerm+1];
*ppDoclist = (const u8*)&p->zKey[nTerm+1];
*pnDoclist = p->nData - (sizeof(*p) + nTerm + 1);
}else{
*ppDoclist = 0;
@ -421,7 +421,7 @@ int sqlite3Fts5HashScanEof(Fts5Hash *p){
void sqlite3Fts5HashScanEntry(
Fts5Hash *pHash,
const char **pzTerm, /* OUT: term (nul-terminated) */
const char **ppDoclist, /* OUT: pointer to doclist */
const u8 **ppDoclist, /* OUT: pointer to doclist */
int *pnDoclist /* OUT: size of doclist in bytes */
){
Fts5HashEntry *p;
@ -429,7 +429,7 @@ void sqlite3Fts5HashScanEntry(
int nTerm = strlen(p->zKey);
fts5HashAddPoslistSize(p);
*pzTerm = p->zKey;
*ppDoclist = &p->zKey[nTerm+1];
*ppDoclist = (const u8*)&p->zKey[nTerm+1];
*pnDoclist = p->nData - (sizeof(*p) + nTerm + 1);
}else{
*pzTerm = 0;

View File

@ -1797,7 +1797,7 @@ static void fts5SegIterNext(
pIter->iRowid += iDelta;
}
}else if( pIter->pSeg==0 ){
const char *pList = 0;
const u8 *pList = 0;
const char *zTerm;
int nList;
if( 0==(pIter->flags & FTS5_SEGITER_ONETERM) ){
@ -1811,7 +1811,7 @@ static void fts5SegIterNext(
pIter->pLeaf->p = (u8*)pList;
pIter->pLeaf->n = nList;
sqlite3Fts5BufferSet(&p->rc, &pIter->term, strlen(zTerm), (u8*)zTerm);
pIter->iLeafOffset = getVarint((u8*)pList, (u64*)&pIter->iRowid);
pIter->iLeafOffset = getVarint(pList, (u64*)&pIter->iRowid);
if( pIter->flags & FTS5_SEGITER_REVERSE ){
fts5SegIterReverseInitPage(p, pIter);
}
@ -2075,7 +2075,7 @@ static void fts5SegIterHashInit(
Fts5SegIter *pIter /* Object to populate */
){
Fts5Hash *pHash = p->apHash[iIdx];
const char *pList = 0;
const u8 *pList = 0;
int nList = 0;
const u8 *z = 0;
int n = 0;
@ -3433,7 +3433,7 @@ static void fts5FlushOneHash(Fts5Index *p, int iHash, int *pnLeaf){
Fts5StructureSegment *pSeg; /* New segment within pStruct */
int nHeight; /* Height of new segment b-tree */
Fts5Buffer *pBuf; /* Buffer in which to assemble leaf page */
const char *zPrev = 0;
const u8 *zPrev = 0;
Fts5SegWriter writer;
fts5WriteInit(p, &writer, iHash, iSegid);
@ -3458,7 +3458,7 @@ static void fts5FlushOneHash(Fts5Index *p, int iHash, int *pnLeaf){
int nDoclist;
int nSuffix; /* Size of term suffix */
sqlite3Fts5HashScanEntry(pHash, &zTerm,(const char**)&pDoclist,&nDoclist);
sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist);
nTerm = strlen(zTerm);
/* Decide if the term fits on the current leaf. If not, flush it
@ -3474,14 +3474,14 @@ static void fts5FlushOneHash(Fts5Index *p, int iHash, int *pnLeaf){
/* Write the term to the leaf. And push it up into the b-tree hierarchy */
if( writer.bFirstTermInPage==0 ){
int nPre = fts5PrefixCompress(nTerm, zPrev, nTerm, zTerm);
int nPre = fts5PrefixCompress(nTerm, zPrev, nTerm, (const u8*)zTerm);
pBuf->n += sqlite3PutVarint(&pBuf->p[pBuf->n], nPre);
nSuffix = nTerm - nPre;
}else{
fts5PutU16(&pBuf->p[2], pBuf->n);
writer.bFirstTermInPage = 0;
if( writer.aWriter[0].pgno!=1 ){
int nPre = fts5PrefixCompress(nTerm, zPrev, nTerm, zTerm);
int nPre = fts5PrefixCompress(nTerm, zPrev, nTerm, (const u8*)zTerm);
fts5WriteBtreeTerm(p, &writer, nPre+1, (const u8*)zTerm);
pBuf = &writer.aWriter[0].buf;
assert( nPre<nTerm );
@ -3553,7 +3553,7 @@ static void fts5FlushOneHash(Fts5Index *p, int iHash, int *pnLeaf){
pBuf->p[pBuf->n++] = '\0';
assert( pBuf->n<=pBuf->nSpace );
zPrev = zTerm;
zPrev = (const u8*)zTerm;
sqlite3Fts5HashScanNext(pHash);
}
sqlite3Fts5HashClear(pHash);

View File

@ -1,5 +1,5 @@
C Fix\sthe\sbm25()\sfunction\sso\sthat\sit\smultiplies\sscores\sby\s-1\sbefore\sreturning\sthem.\sThis\smeans\sbetter\smatches\shave\sa\slower\snumerical\sscore,\sso\s"ORDER\sBY\srank"\s(not\s"ORDER\sBY\srank\sDESC")\sdoes\swhat\syou\swant.
D 2015-03-07T11:50:31.532
C Fix\ssome\scompiler\swarnings\scaused\sby\ssigned/unsigned\spointer\sconversions.
D 2015-03-07T15:46:41.341
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5407a688f4d77a05c18a8142be8ae5a2829dd610
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -106,13 +106,13 @@ F ext/fts3/unicode/mkunicode.tcl 159c1194da0bc72f51b3c2eb71022568006dc5ad
F ext/fts5/extract_api_docs.tcl 55a6d648d516f35d9a1e580ac00de27154e1904a
F ext/fts5/fts5.c 1eb8ca073be5222c43e4eee5408764c2cbb4200b
F ext/fts5/fts5.h 24a2cc35b5e76eec57b37ba48c12d9d2cb522b3a
F ext/fts5/fts5Int.h 5c8efea3d0a1ccc70194225f8c402a1732ed5ad5
F ext/fts5/fts5Int.h 1dcb02943f3a55d275d5473911a7e991d638c73c
F ext/fts5/fts5_aux.c fcea18b1a2a3f95a498b52aba2983557d7678a22
F ext/fts5/fts5_buffer.c 29f79841bf6eef5220eef41b122419b1bcb07b06
F ext/fts5/fts5_config.c 0847facc8914f57ea4452c43ce109200dc65e894
F ext/fts5/fts5_expr.c 5215137efab527577d36bdf9e44bfc2ec3e1be98
F ext/fts5/fts5_hash.c 13fcefb50a178c0f5086b88cdd781e26c413a3cb
F ext/fts5/fts5_index.c db8dc4cf906245dfd8a8d724695b60d6f22b7654
F ext/fts5/fts5_hash.c 9959b5408f649487d4b0ee081416f37dc3cd8cdd
F ext/fts5/fts5_index.c 3eb8db82d08386d6777faeb4ff45ee998b3d9a81
F ext/fts5/fts5_storage.c ac0f0937059c8d4f38a1f13aa5f2c2cd7edf3e0d
F ext/fts5/fts5_tcl.c 617b6bb96545be8d9045de6967c688cd9cd15541
F ext/fts5/fts5_tokenize.c c3fe30914f7722941ea9e0092c07ab5ae87112e4
@ -1284,7 +1284,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P a5d5468c0509d129e198bf9432190ee07cedb7af
R aa671856811e9ea4e67d518a4616a999
P 3ee7b5a9f987c269251620ae7cc0fc7876b58ee5
R 2a14dede3733f8ccd7d343d89b036f09
U dan
Z 4764624a6d652eca0ea7813e6c8b51f7
Z b868027a203766c0d15e29e2b4da678d

View File

@ -1 +1 @@
3ee7b5a9f987c269251620ae7cc0fc7876b58ee5
cccee7b5b1e84523f1c549d3052fd170e32bde80