Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: third_party/sqlite/src/ext/misc/amatch.c

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/ext/icu/icu.c ('k') | third_party/sqlite/src/ext/misc/carray.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/misc/amatch.c
diff --git a/third_party/sqlite/src/ext/misc/amatch.c b/third_party/sqlite/src/ext/misc/amatch.c
index 852491988aa0e606e91928569977e1d0a7765037..efe76566ee694a1785f6d3ab9680541e0119335a 100644
--- a/third_party/sqlite/src/ext/misc/amatch.c
+++ b/third_party/sqlite/src/ext/misc/amatch.c
@@ -625,10 +625,10 @@ static int amatchLoadOneRule(
}else{
memset(pRule, 0, sizeof(*pRule));
pRule->zFrom = &pRule->zTo[nTo+1];
- pRule->nFrom = nFrom;
+ pRule->nFrom = (amatch_len)nFrom;
memcpy(pRule->zFrom, zFrom, nFrom+1);
memcpy(pRule->zTo, zTo, nTo+1);
- pRule->nTo = nTo;
+ pRule->nTo = (amatch_len)nTo;
pRule->rCost = rCost;
pRule->iLang = (int)iLang;
}
@@ -1081,7 +1081,7 @@ static void amatchAddWord(
pWord->rCost = rCost;
pWord->iSeq = pCur->nWord++;
amatchWriteCost(pWord);
- pWord->nMatch = nMatch;
+ pWord->nMatch = (short)nMatch;
pWord->pNext = pCur->pAllWords;
pCur->pAllWords = pWord;
pWord->sCost.zKey = pWord->zCost;
@@ -1162,7 +1162,7 @@ static int amatchNext(sqlite3_vtab_cursor *cur){
#endif
nWord = (int)strlen(pWord->zWord+2);
if( nWord+20>nBuf ){
- nBuf = nWord+100;
+ nBuf = (char)(nWord+100);
zBuf = sqlite3_realloc(zBuf, nBuf);
if( zBuf==0 ) return SQLITE_NOMEM;
}
« no previous file with comments | « third_party/sqlite/src/ext/icu/icu.c ('k') | third_party/sqlite/src/ext/misc/carray.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698