mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix compiler warnings in the sqldiff tool seen with MSVC.
FossilOrigin-Name: 072279d458fbb74a812a9ee723041d6b7c662a88
This commit is contained in:
15
manifest
15
manifest
@ -1,5 +1,5 @@
|
|||||||
C Fix\sstray\svariable\sdeclaration\sfor\sC89.
|
C Fix\scompiler\swarnings\sin\sthe\ssqldiff\stool\sseen\swith\sMSVC.
|
||||||
D 2015-08-20T20:21:06.528
|
D 2015-08-20T21:09:32.725
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in 4f663b6b4954b9b1eb0e6f08387688a93b57542d
|
F Makefile.in 4f663b6b4954b9b1eb0e6f08387688a93b57542d
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@ -1365,7 +1365,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
|
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
|
||||||
F tool/sqldiff.c a6988cc6e10e08662d73df28538df43b01dc371e
|
F tool/sqldiff.c b318efc2eaf7a7fac4d281a0ce736193cb2506df
|
||||||
F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
|
F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
|
||||||
F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
|
F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
|
||||||
F tool/symbols.sh fec58532668296d7c7dc48be9c87f75ccdb5814f
|
F tool/symbols.sh fec58532668296d7c7dc48be9c87f75ccdb5814f
|
||||||
@ -1376,7 +1376,10 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||||
P a7acc7878b8bb8e27a0da67b2dbb7bd51df4859b
|
P 17eb7f18cb76170e109977a94b259b763cd86c47
|
||||||
R ab9999ab7b4e03861512ce91d476cfe4
|
R 104bda6f56c91429ce0a720bb365ee76
|
||||||
|
T *branch * msvcWarn
|
||||||
|
T *sym-msvcWarn *
|
||||||
|
T -sym-trunk *
|
||||||
U mistachkin
|
U mistachkin
|
||||||
Z 6bb10870cccae9f7d2b7bc147f067428
|
Z 3c2642f645417b50de6b6b4d431a1560
|
||||||
|
@ -1 +1 @@
|
|||||||
17eb7f18cb76170e109977a94b259b763cd86c47
|
072279d458fbb74a812a9ee723041d6b7c662a88
|
@ -810,9 +810,9 @@ static void hash_init(hash *pHash, const char *z){
|
|||||||
*/
|
*/
|
||||||
static void hash_next(hash *pHash, int c){
|
static void hash_next(hash *pHash, int c){
|
||||||
u16 old = pHash->z[pHash->i];
|
u16 old = pHash->z[pHash->i];
|
||||||
pHash->z[pHash->i] = c;
|
pHash->z[pHash->i] = (char)c;
|
||||||
pHash->i = (pHash->i+1)&(NHASH-1);
|
pHash->i = (pHash->i+1)&(NHASH-1);
|
||||||
pHash->a = pHash->a - old + c;
|
pHash->a = pHash->a - old + (char)c;
|
||||||
pHash->b = pHash->b - NHASH*old + pHash->a;
|
pHash->b = pHash->b - NHASH*old + pHash->a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -849,7 +849,7 @@ static void putInt(unsigned int v, char **pz){
|
|||||||
*/
|
*/
|
||||||
static int digit_count(int v){
|
static int digit_count(int v){
|
||||||
unsigned int i, x;
|
unsigned int i, x;
|
||||||
for(i=1, x=64; v>=x; i++, x <<= 6){}
|
for(i=1, x=64; (unsigned int)v>=x; i++, x <<= 6){}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -956,7 +956,7 @@ static int rbuDeltaCreate(
|
|||||||
unsigned int lenOut, /* Length of the target file */
|
unsigned int lenOut, /* Length of the target file */
|
||||||
char *zDelta /* Write the delta into this buffer */
|
char *zDelta /* Write the delta into this buffer */
|
||||||
){
|
){
|
||||||
int i, base;
|
unsigned int i, base;
|
||||||
char *zOrigDelta = zDelta;
|
char *zOrigDelta = zDelta;
|
||||||
hash h;
|
hash h;
|
||||||
int nHash; /* Number of hash table entries */
|
int nHash; /* Number of hash table entries */
|
||||||
@ -1005,7 +1005,7 @@ static int rbuDeltaCreate(
|
|||||||
base = 0; /* We have already generated everything before zOut[base] */
|
base = 0; /* We have already generated everything before zOut[base] */
|
||||||
while( base+NHASH<lenOut ){
|
while( base+NHASH<lenOut ){
|
||||||
int iSrc, iBlock;
|
int iSrc, iBlock;
|
||||||
unsigned int bestCnt, bestOfst=0, bestLitsz=0;
|
int bestCnt, bestOfst=0, bestLitsz=0;
|
||||||
hash_init(&h, &zOut[base]);
|
hash_init(&h, &zOut[base]);
|
||||||
i = 0; /* Trying to match a landmark against zOut[base+i] */
|
i = 0; /* Trying to match a landmark against zOut[base+i] */
|
||||||
bestCnt = 0;
|
bestCnt = 0;
|
||||||
@ -1038,14 +1038,18 @@ static int rbuDeltaCreate(
|
|||||||
/* Beginning at iSrc, match forwards as far as we can. j counts
|
/* Beginning at iSrc, match forwards as far as we can. j counts
|
||||||
** the number of characters that match */
|
** the number of characters that match */
|
||||||
iSrc = iBlock*NHASH;
|
iSrc = iBlock*NHASH;
|
||||||
for(j=0, x=iSrc, y=base+i; x<lenSrc && y<lenOut; j++, x++, y++){
|
for(
|
||||||
|
j=0, x=iSrc, y=base+i;
|
||||||
|
(unsigned int)x<lenSrc && (unsigned int)y<lenOut;
|
||||||
|
j++, x++, y++
|
||||||
|
){
|
||||||
if( zSrc[x]!=zOut[y] ) break;
|
if( zSrc[x]!=zOut[y] ) break;
|
||||||
}
|
}
|
||||||
j--;
|
j--;
|
||||||
|
|
||||||
/* Beginning at iSrc-1, match backwards as far as we can. k counts
|
/* Beginning at iSrc-1, match backwards as far as we can. k counts
|
||||||
** the number of characters that match */
|
** the number of characters that match */
|
||||||
for(k=1; k<iSrc && k<=i; k++){
|
for(k=1; k<iSrc && (unsigned int)k<=i; k++){
|
||||||
if( zSrc[iSrc-k]!=zOut[base+i-k] ) break;
|
if( zSrc[iSrc-k]!=zOut[base+i-k] ) break;
|
||||||
}
|
}
|
||||||
k--;
|
k--;
|
||||||
|
Reference in New Issue
Block a user