From 73f940c89eba2daede2e4fba4ee84b2f1922cb52 Mon Sep 17 00:00:00 2001 From: drh Date: Sat, 13 Apr 2019 14:17:09 +0000 Subject: [PATCH] Fix additional compiler warnings introduced by the previous check-in and found by MSVC. FossilOrigin-Name: 6fc0deffa4eed902fd13eefe6d2765f338f3dadc5b29f7cae5064e135417746b --- ext/fts3/fts3_snippet.c | 9 +++++---- manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ext/fts3/fts3_snippet.c b/ext/fts3/fts3_snippet.c index d214e45f64..d5ebda6a05 100644 --- a/ext/fts3/fts3_snippet.c +++ b/ext/fts3/fts3_snippet.c @@ -128,7 +128,7 @@ struct StrBuffer { /* ** Allocate a two-slot MatchinfoBuffer object. */ -static MatchinfoBuffer *fts3MIBufferNew(int nElem, const char *zMatchinfo){ +static MatchinfoBuffer *fts3MIBufferNew(size_t nElem, const char *zMatchinfo){ MatchinfoBuffer *pRet; sqlite3_int64 nByte = sizeof(u32) * (2*(sqlite3_int64)nElem + 1) + sizeof(MatchinfoBuffer); @@ -138,8 +138,9 @@ static MatchinfoBuffer *fts3MIBufferNew(int nElem, const char *zMatchinfo){ if( pRet ){ memset(pRet, 0, nByte); pRet->aMatchinfo[0] = (u8*)(&pRet->aMatchinfo[1]) - (u8*)pRet; - pRet->aMatchinfo[1+nElem] = pRet->aMatchinfo[0] + sizeof(u32)*(nElem+1); - pRet->nElem = nElem; + pRet->aMatchinfo[1+nElem] = pRet->aMatchinfo[0] + + sizeof(u32)*((int)nElem+1); + pRet->nElem = (int)nElem; pRet->zMatchinfo = ((char*)pRet) + nByte; memcpy(pRet->zMatchinfo, zMatchinfo, nStr+1); pRet->aRef[0] = 1; @@ -1354,7 +1355,7 @@ static void fts3GetMatchinfo( ** initialize those elements that are constant for every row. */ if( pCsr->pMIBuffer==0 ){ - int nMatchinfo = 0; /* Number of u32 elements in match-info */ + size_t nMatchinfo = 0; /* Number of u32 elements in match-info */ int i; /* Used to iterate through zArg */ /* Determine the number of phrases in the query */ diff --git a/manifest b/manifest index f1aaf0122b..43d67b29e6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fixes\sfor\sharmless\scompiler\swarnings. -D 2019-04-13T14:07:57.472 +C Fix\sadditional\scompiler\swarnings\sintroduced\sby\sthe\sprevious\scheck-in\sand\sfound\nby\sMSVC. +D 2019-04-13T14:17:09.598 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -90,7 +90,7 @@ F ext/fts3/fts3_hash.c 8b6e31bfb0844c27dc6092c2620bdb1fca17ed613072db057d96952c6 F ext/fts3/fts3_hash.h 39cf6874dc239d6b4e30479b1975fe5b22a3caaf F ext/fts3/fts3_icu.c 305ce7fb6036484085b5556a9c8e62acdc7763f0f4cdf5fd538212a9f3720116 F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009 -F ext/fts3/fts3_snippet.c 09b38ba5bfe5667aacddcb88b047fe0f7218efeb3fc8dee0e4eb6ebd170318b9 +F ext/fts3/fts3_snippet.c 2f3a78b990f1c8658225618c8a0fa06ab60046688d6fb627a548e8ada9011150 F ext/fts3/fts3_term.c f45a1e7c6ef464abb1231245d123dae12266b69e05cc56e14045b76591ae92d1 F ext/fts3/fts3_test.c 5f65679c195e53701d9e21d3dc73b0c09f146ae4ad86ae802d0ddaf62b29f9cd F ext/fts3/fts3_tokenize_vtab.c 1de9a61acfa2a0445ed989310c31839c57f6b6086dd9d5c97177ae734a17fd8b @@ -1818,7 +1818,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 07ee06fd390bfebebc014b47583d489747b0423bb96c810bed5c605ce0e3be71 -R b2ecaf35e009c36922e149aaa8d2b2c6 +P c28c973ad6debd63f13e5d4d3da036f680baaec9d863eda039f2747db9f1cfd5 +R b2889ba2efb6123da4b3c2b9a04b0f08 U drh -Z 2c133b00e5aeb137166a48df07d40217 +Z 6870a410080a28a022c557121c526d92 diff --git a/manifest.uuid b/manifest.uuid index f4f9bff615..3e2caf5df9 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c28c973ad6debd63f13e5d4d3da036f680baaec9d863eda039f2747db9f1cfd5 \ No newline at end of file +6fc0deffa4eed902fd13eefe6d2765f338f3dadc5b29f7cae5064e135417746b \ No newline at end of file