Fix harmless compiler warnings in the fts3view utility program that can occur with MSVC.

FossilOrigin-Name: 1cec1e030035e5253fb7ebbdfe5c1a3029e4e29b
This commit is contained in:
mistachkin 2014-07-07 18:03:38 +00:00
parent de54527fb2
commit 166c373779
3 changed files with 14 additions and 13 deletions

View File

@ -554,7 +554,7 @@ static void decodeSegment(
sqlite3_int64 n;
sqlite3_int64 iDocsz;
int iHeight;
int i = 0;
sqlite3_int64 i = 0;
int cnt = 0;
char zTerm[1000];
@ -576,12 +576,12 @@ static void decodeSegment(
fprintf(stderr, "term to long\n");
exit(1);
}
memcpy(zTerm+iPrefix, aData+i, nTerm);
memcpy(zTerm+iPrefix, aData+i, (size_t)nTerm);
zTerm[iPrefix+nTerm] = 0;
i += nTerm;
if( iHeight==0 ){
i += getVarint(aData+i, &iDocsz);
printf("term: %-25s doclist %7lld bytes offset %d\n", zTerm, iDocsz, i);
printf("term: %-25s doclist %7lld bytes offset %lld\n", zTerm, iDocsz, i);
i += iDocsz;
}else{
printf("term: %-25s child %lld\n", zTerm, ++iChild);
@ -749,18 +749,19 @@ static void decodeDoclist(
*/
static void showDoclist(sqlite3 *db, const char *zTab){
const unsigned char *aData;
sqlite3_int64 offset, nData;
sqlite3_int64 offset;
int nData;
sqlite3_stmt *pStmt;
offset = atoi64(azExtra[1]);
nData = atoi64(azExtra[2]);
nData = atoi(azExtra[2]);
pStmt = prepareToGetSegment(db, zTab, azExtra[0]);
if( sqlite3_step(pStmt)!=SQLITE_ROW ){
sqlite3_finalize(pStmt);
return;
}
aData = sqlite3_column_blob(pStmt, 0);
printf("Doclist at %s offset %lld of size %lld bytes:\n",
printf("Doclist at %s offset %lld of size %d bytes:\n",
azExtra[0], offset, nData);
if( findOption("raw", 0, 0)!=0 ){
printBlob(aData+offset, nData);

View File

@ -1,5 +1,5 @@
C Add\sthe\sfts3view\sutility\sprogram\sto\sthe\sMSVC\smakefile.
D 2014-07-07T17:57:50.539
C Fix\sharmless\scompiler\swarnings\sin\sthe\sfts3view\sutility\sprogram\sthat\scan\soccur\swith\sMSVC.
D 2014-07-07T18:03:38.442
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 1732320ecac3fee229d560d7ef2afa34681d1815
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -99,7 +99,7 @@ F ext/fts3/fts3_unicode2.c c8adda75aad0c6c252ef3dd555f811f437485044
F ext/fts3/fts3_write.c 8260388626516a7005d06a9dce94f9e55c6c2a41
F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9
F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
F ext/fts3/tool/fts3view.c e2bc4c5c549541b74e367039399ce47320fbae57
F ext/fts3/tool/fts3view.c 3986531f2fc0ceca0c89c31ec7d0589b6adb19d6
F ext/fts3/unicode/CaseFolding.txt 8c678ca52ecc95e16bc7afc2dbf6fc9ffa05db8c
F ext/fts3/unicode/UnicodeData.txt cd07314edb62d49fde34debdaf92fa2aa69011e7
F ext/fts3/unicode/mkunicode.tcl dc6f268eb526710e2c6e496c372471d773d0c368
@ -1182,7 +1182,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 64f02699b4bd747e4c2f0debf72d37ec275137d8
R c90797aa6cbf897903a4492efeae675d
P b04751bd59fed513ab615e7f368fe25c64b3607c
R 30e3947db20694bb71560953bb8a13c2
U mistachkin
Z 28a255fbc95b5b8b8da59816ed21faba
Z 58c34cf56858b67c344e911b0fcd0cab

View File

@ -1 +1 @@
b04751bd59fed513ab615e7f368fe25c64b3607c
1cec1e030035e5253fb7ebbdfe5c1a3029e4e29b