More explicit type casting to silence VC++. (CVS 6006)

FossilOrigin-Name: 14e6d19c3157ccdce170e769d678c7f472dd3db2
This commit is contained in:
drh 2008-12-10 18:03:45 +00:00
parent dc5ea5c785
commit b27b7f5d3b
13 changed files with 78 additions and 79 deletions

View File

@ -1,5 +1,5 @@
C Remove\sor\srename\slocal\svariables\sthat\sshadow\sother\svariables\sor\sparameters.\s(CVS\s6005)
D 2008-12-10T17:20:00
C More\sexplicit\stype\scasting\sto\ssilence\sVC++.\s(CVS\s6006)
D 2008-12-10T18:03:46
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in f7e4c81c347b04f7b0f1c1b081a168645d7b8af7
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -141,17 +141,17 @@ F src/os_unix.c cec838fe55eaa53f1ff02ecb311cdd2188c4db95
F src/os_win.c 79e55bbe2177c4824d24d365b1274703c710f504
F src/pager.c e72e92d44365d75563d26957e6ba4a2ec0796da5
F src/pager.h 37f5173612b7803f44656c16e80df3280234bb18
F src/parse.y 1f4b7ad690864911919da0c76fa96fd72694185e
F src/parse.y 3dfd941533cdc6ce0b09b905b25c4eb73858400b
F src/pcache.c 16dc8da6e6ba6250f8dfd9ee46036db1cbceedc6
F src/pcache.h f20c3e82dd6da622c3fe296170cb1801f9a2d75a
F src/pcache1.c fb6cf5b80996ed316842d25005f4981bef7ce548
F src/pcache1.c 533b18aa2456b0f135e376289443e0a342e0c456
F src/pragma.c 88050d5afa74fcae1bb260311fe05918f04bc8a5
F src/prepare.c 26808c3d6ad2cd85a67969b14fd77bfbe92aaffb
F src/printf.c e29d9475c63e1dbfae005b98da3a60e07b5c1ca5
F src/printf.c b42e767ee0546587a831a5c0a1d7e8b8d80cbb40
F src/random.c 67bf41b20f1983a0e481e7abb98d64704ee26884
F src/resolve.c 6dd09880a8a9b74f5bc1aa2ae4247b1afe6acd65
F src/resolve.c 83d668f2d622e2639f520fff00e129925bdc9d3b
F src/rowset.c 2256fa4a928f750e2f3d6fc733523034beceb1d6
F src/select.c e5b3b244e349cc42401fb62a6c14ea09ea46403c
F src/select.c ea915ff233f1d7136ceaee1443d676ade95d4a08
F src/shell.c 484bddeefac9314be18d4a60d401e93848274ee8
F src/sqlite.h.in 619a82b485fbf02276ecb8b1cc629f0c8bcda4ca
F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
@ -190,18 +190,18 @@ F src/test_thread.c d74fc445e0dba0e00806117eb449b307c0b146bf
F src/test_wsd.c c297d7d6b8a990239e1bd25935e81d612d8ae31d
F src/tokenize.c aaa5fa6a4536a9dd7c855a3f66f32508f1612138
F src/trigger.c 9244c483e5256982e6f32d6f430af6ec10344980
F src/update.c 7143ac31d26dee156277126e9a7c5be953b18347
F src/update.c 3e022c24e265b0975e51f2ec0348ef84eeaba311
F src/utf.c 515ce4f1e039635197e7f0df46cf8a7ac659a571
F src/util.c 6e997af379d3aa609bf084d7d10fdc1cf32cc72c
F src/vacuum.c 383d6297bddc011ab04a9eed110db6eaf523e8e9
F src/vdbe.c fce160c74aad54d14e2bdd8a30443fd78f7b26c5
F src/vdbe.c b99af9ad1764b34831ce7e91975d1a7acf6121a7
F src/vdbe.h 03516f28bf5aca00a53c4dccd6c313f96adb94f6
F src/vdbeInt.h e6e80a99ce634983b7cc2498843b4d2e5540900a
F src/vdbeapi.c 20722164e7701a0747eaea03cddbbe0de5cb37bf
F src/vdbeapi.c 85c33cfbfa56249cbe627831610afafba754477d
F src/vdbeaux.c 2b7bfb736a9ad9f48b82149a47c8f430e5df730a
F src/vdbeblob.c b0dcebfafedcf9c0addc7901ad98f6f986c08935
F src/vdbemem.c 15dc139e0b9e328e63971e02a7552e8da73b16e8
F src/vtab.c c4bd078008a7d031f2d88c8a5b67a60eb5966254
F src/vdbemem.c 598741bc060400643b6110a3fe24891333df3d07
F src/vtab.c 09df27d47ed9fef31ad94c79053fac02d5d2073a
F src/walker.c 488c2660e13224ff70c0c82761118efb547f8f0d
F src/where.c c5a21be6d5705d1c2c6f5d56a97785e4752791d2
F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617
@ -642,7 +642,7 @@ F tool/genfkey.README 080ca2269f727fcf14c8e76d52e85d157e3a8e9a
F tool/genfkey.c e1b9c93da828db10c1109c7b4fa611aec8adc407
F tool/genfkey.test 182829596fb15785b94b2493c5f735b847d91076
F tool/lemon.c 6cb39632ef3bfec2cea8f81b4d7f63c09fe12802
F tool/lempar.c 9ef6809804f9066fa94a0bdc02224ce015951843
F tool/lempar.c fece0da829c0e425f13e6da1671619bed43d0f70
F tool/memleak.awk 4e7690a51bf3ed757e611273d43fe3f65b510133
F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8
F tool/memleak3.tcl 7707006ee908cffff210c98158788d85bb3fcdbf
@ -664,7 +664,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P da1cbfa766f7f379c01f4ac9c1210462d8d7c590
R a2d9934353d665c83ba1bf37542e5a35
P e7e9fa4fa1b7fc0668f4e3a51873ee5d11893f42
R 3fdd485d39b8ec78e53f9d12f6f15e2c
U drh
Z 8d8b858819df06179da86dc62696f90a
Z 0329544b446f709fe3cdc363492e43f9

View File

@ -1 +1 @@
e7e9fa4fa1b7fc0668f4e3a51873ee5d11893f42
14e6d19c3157ccdce170e769d678c7f472dd3db2

View File

@ -14,7 +14,7 @@
** the parser. Lemon will also generate a header file containing
** numeric codes for all of the tokens.
**
** @(#) $Id: parse.y,v 1.264 2008/12/08 16:01:13 drh Exp $
** @(#) $Id: parse.y,v 1.265 2008/12/10 18:03:46 drh Exp $
*/
// All token codes are small integers with #defines that begin with "TK_"
@ -149,7 +149,7 @@ columnlist ::= column.
//
column(A) ::= columnid(X) type carglist. {
A.z = X.z;
A.n = (pParse->sLastToken.z-X.z) + pParse->sLastToken.n;
A.n = (int)(pParse->sLastToken.z-X.z) + pParse->sLastToken.n;
}
columnid(A) ::= nm(X). {
sqlite3AddColumn(pParse,&X);
@ -226,15 +226,15 @@ type ::= typetoken(X). {sqlite3AddColumnType(pParse,&X);}
typetoken(A) ::= typename(X). {A = X;}
typetoken(A) ::= typename(X) LP signed RP(Y). {
A.z = X.z;
A.n = &Y.z[Y.n] - X.z;
A.n = (int)(&Y.z[Y.n] - X.z);
}
typetoken(A) ::= typename(X) LP signed COMMA signed RP(Y). {
A.z = X.z;
A.n = &Y.z[Y.n] - X.z;
A.n = (int)(&Y.z[Y.n] - X.z);
}
%type typename {Token}
typename(A) ::= ids(X). {A = X;}
typename(A) ::= typename(X) ids(Y). {A.z=X.z; A.n=Y.n+(Y.z-X.z);}
typename(A) ::= typename(X) ids(Y). {A.z=X.z; A.n=Y.n+(int)(Y.z-X.z);}
signed ::= plus_num.
signed ::= minus_num.
@ -377,7 +377,7 @@ select(A) ::= oneselect(X). {A = X;}
%ifndef SQLITE_OMIT_COMPOUND_SELECT
select(A) ::= select(X) multiselect_op(Y) oneselect(Z). {
if( Z ){
Z->op = Y;
Z->op = (u8)Y;
Z->pPrior = X;
}else{
sqlite3SelectDelete(pParse->db, X);
@ -456,7 +456,7 @@ from(A) ::= FROM seltablist(X). {
//
stl_prefix(A) ::= seltablist(X) joinop(Y). {
A = X;
if( A && A->nSrc>0 ) A->a[A->nSrc-1].jointype = Y;
if( A && A->nSrc>0 ) A->a[A->nSrc-1].jointype = (u8)Y;
}
stl_prefix(A) ::= . {A = 0;}
seltablist(A) ::= stl_prefix(X) nm(Y) dbnm(D) as(Z) indexed_opt(I) on_opt(N) using_opt(U). {
@ -546,11 +546,11 @@ orderby_opt(A) ::= . {A = 0;}
orderby_opt(A) ::= ORDER BY sortlist(X). {A = X;}
sortlist(A) ::= sortlist(X) COMMA sortitem(Y) sortorder(Z). {
A = sqlite3ExprListAppend(pParse,X,Y,0);
if( A ) A->a[A->nExpr-1].sortOrder = Z;
if( A ) A->a[A->nExpr-1].sortOrder = (u8)Z;
}
sortlist(A) ::= sortitem(Y) sortorder(Z). {
A = sqlite3ExprListAppend(pParse,0,Y,0);
if( A && A->a ) A->a[0].sortOrder = Z;
if( A && A->a ) A->a[0].sortOrder = (u8)Z;
}
sortitem(A) ::= expr(X). {A = X;}
@ -950,7 +950,7 @@ idxlist(A) ::= idxlist(X) COMMA nm(Y) collate(C) sortorder(Z). {
}
A = sqlite3ExprListAppend(pParse,X, p, &Y);
sqlite3ExprListCheckLength(pParse, A, "index");
if( A ) A->a[A->nExpr-1].sortOrder = Z;
if( A ) A->a[A->nExpr-1].sortOrder = (u8)Z;
}
idxlist(A) ::= nm(Y) collate(C) sortorder(Z). {
Expr *p = 0;
@ -960,7 +960,7 @@ idxlist(A) ::= nm(Y) collate(C) sortorder(Z). {
}
A = sqlite3ExprListAppend(pParse,0, p, &Y);
sqlite3ExprListCheckLength(pParse, A, "index");
if( A ) A->a[A->nExpr-1].sortOrder = Z;
if( A ) A->a[A->nExpr-1].sortOrder = (u8)Z;
}
%type collate {Token}
@ -1010,7 +1010,7 @@ plus_opt ::= .
cmd ::= CREATE trigger_decl(A) BEGIN trigger_cmd_list(S) END(Z). {
Token all;
all.z = A.z;
all.n = (Z.z - A.z) + Z.n;
all.n = (int)(Z.z - A.z) + Z.n;
sqlite3FinishTrigger(pParse, S, &all);
}

View File

@ -16,7 +16,7 @@
** If the default page cache implementation is overriden, then neither of
** these two features are available.
**
** @(#) $Id: pcache1.c,v 1.5 2008/12/06 14:34:34 drh Exp $
** @(#) $Id: pcache1.c,v 1.6 2008/12/10 18:03:46 drh Exp $
*/
#include "sqliteInt.h"
@ -272,7 +272,7 @@ static int pcache1ResizeHash(PCache1 *p){
for(i=0; i<p->nHash; i++){
PgHdr1 *pPage;
PgHdr1 *pNext = p->apHash[i];
while( (pPage = pNext) ){
while( (pPage = pNext)!=0 ){
unsigned int h = pPage->iKey % nNew;
pNext = pPage->pNext;
pPage->pNext = apNew[h];
@ -364,7 +364,7 @@ static void pcache1TruncateUnsafe(
for(h=0; h<pCache->nHash; h++){
PgHdr1 **pp = &pCache->apHash[h];
PgHdr1 *pPage;
while( (pPage = *pp) ){
while( (pPage = *pp)!=0 ){
if( pPage->iKey>=iLimit ){
pcache1PinPage(pPage);
*pp = pPage->pNext;

View File

@ -5,7 +5,7 @@
** an historical reference. Most of the "enhancements" have been backed
** out so that the functionality is now the same as standard printf().
**
** $Id: printf.c,v 1.97 2008/11/22 18:28:51 drh Exp $
** $Id: printf.c,v 1.98 2008/12/10 18:03:46 drh Exp $
**
**************************************************************************
**
@ -245,7 +245,7 @@ void sqlite3VXPrintf(
const et_info *infop; /* Pointer to the appropriate info structure */
char buf[etBUFSIZE]; /* Conversion buffer */
char prefix; /* Prefix character. "+" or "-" or " " or '\0'. */
etByte xtype; /* Conversion paradigm */
etByte xtype = 0; /* Conversion paradigm */
char *zExtra; /* Extra memory used for etTCLESCAPE conversions */
#ifndef SQLITE_OMIT_FLOATING_POINT
int exp, e2; /* exponent of real numbers */

View File

@ -14,7 +14,7 @@
** resolve all identifiers by associating them with a particular
** table and column.
**
** $Id: resolve.c,v 1.13 2008/12/09 14:03:22 drh Exp $
** $Id: resolve.c,v 1.14 2008/12/10 18:03:46 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
@ -219,7 +219,7 @@ static int lookupName(
if( zDb==0 && zTab!=0 && cnt==0 && pParse->trigStack!=0 ){
TriggerStack *pTriggerStack = pParse->trigStack;
Table *pTab = 0;
u32 *piColMask;
u32 *piColMask = 0;
if( pTriggerStack->newIdx != -1 && sqlite3StrICmp("new", zTab) == 0 ){
pExpr->iTable = pTriggerStack->newIdx;
assert( pTriggerStack->pTab );

View File

@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.491 2008/12/10 17:20:01 drh Exp $
** $Id: select.c,v 1.492 2008/12/10 18:03:46 drh Exp $
*/
#include "sqliteInt.h"
@ -2034,7 +2034,7 @@ static int multiSelectOrderBy(
int regOutA; /* Address register for the output-A subroutine */
int regOutB; /* Address register for the output-B subroutine */
int addrOutA; /* Address of the output-A subroutine */
int addrOutB; /* Address of the output-B subroutine */
int addrOutB = 0; /* Address of the output-B subroutine */
int addrEofA; /* Address of the select-A-exhausted subroutine */
int addrEofB; /* Address of the select-B-exhausted subroutine */
int addrAltB; /* Address of the A<B subroutine */
@ -3539,17 +3539,13 @@ int sqlite3Select(
p->selFlags &= ~SF_Distinct;
}
sqlite3SelectPrep(pParse, p, 0);
pTabList = p->pSrc;
pEList = p->pEList;
if( pParse->nErr || db->mallocFailed ){
goto select_end;
}
p->pOrderBy = pOrderBy;
/* Make local copies of the parameters for this query.
*/
pTabList = p->pSrc;
isAgg = (p->selFlags & SF_Aggregate)!=0;
pEList = p->pEList;
if( pEList==0 ) goto select_end;
/*

View File

@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle UPDATE statements.
**
** $Id: update.c,v 1.188 2008/12/04 20:40:10 drh Exp $
** $Id: update.c,v 1.189 2008/12/10 18:03:47 drh Exp $
*/
#include "sqliteInt.h"
@ -109,10 +109,10 @@ void sqlite3Update(
int isView; /* Trying to update a view */
int triggers_exist = 0; /* True if any row triggers exist */
#endif
int iBeginAfterTrigger; /* Address of after trigger program */
int iEndAfterTrigger; /* Exit of after trigger program */
int iBeginBeforeTrigger; /* Address of before trigger program */
int iEndBeforeTrigger; /* Exit of before trigger program */
int iBeginAfterTrigger = 0; /* Address of after trigger program */
int iEndAfterTrigger = 0; /* Exit of after trigger program */
int iBeginBeforeTrigger = 0; /* Address of before trigger program */
int iEndBeforeTrigger = 0; /* Exit of before trigger program */
u32 old_col_mask = 0; /* Mask of OLD.* columns in use */
u32 new_col_mask = 0; /* Mask of NEW.* columns in use */

View File

@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.793 2008/12/09 02:51:24 drh Exp $
** $Id: vdbe.c,v 1.794 2008/12/10 18:03:47 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -538,8 +538,10 @@ int sqlite3VdbeExec(
int rc = SQLITE_OK; /* Value to return */
sqlite3 *db = p->db; /* The database */
u8 encoding = ENC(db); /* The database encoding */
Mem *pIn1, *pIn2, *pIn3; /* Input operands */
Mem *pOut; /* Output operand */
Mem *pIn1 = 0; /* 1st input operand */
Mem *pIn2 = 0; /* 2nd input operand */
Mem *pIn3 = 0; /* 3rd input operand */
Mem *pOut = 0; /* Output operand */
u8 opProperty;
int iCompare = 0; /* Result of last OP_Compare operation */
int *aPermute = 0; /* Permuation of columns for OP_Compare */
@ -1977,9 +1979,7 @@ case OP_Column: {
Mem *pDest; /* Where to write the extracted value */
Mem sMem; /* For storing the record being decoded */
sMem.flags = 0;
sMem.db = 0;
sMem.zMalloc = 0;
memset(&sMem, 0, sizeof(sMem));
assert( p1<p->nCursor );
assert( pOp->p3>0 && pOp->p3<=p->nMem );
pDest = &p->aMem[pOp->p3];
@ -2054,7 +2054,7 @@ case OP_Column: {
u8 *zEndHdr; /* Pointer to first byte after the header */
int offset; /* Offset into the data */
int szHdrSz; /* Size of the header size field at start of record */
int avail; /* Number of bytes of available data */
int avail = 0; /* Number of bytes of available data */
assert(aType);
pC->aOffset = aOffset = &aType[nField];

View File

@ -13,7 +13,7 @@
** This file contains code use to implement APIs that are part of the
** VDBE.
**
** $Id: vdbeapi.c,v 1.149 2008/11/19 09:05:27 danielk1977 Exp $
** $Id: vdbeapi.c,v 1.150 2008/12/10 18:03:47 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@ -284,7 +284,7 @@ double sqlite3_value_double(sqlite3_value *pVal){
return sqlite3VdbeRealValue((Mem*)pVal);
}
int sqlite3_value_int(sqlite3_value *pVal){
return sqlite3VdbeIntValue((Mem*)pVal);
return (int)sqlite3VdbeIntValue((Mem*)pVal);
}
sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){
return sqlite3VdbeIntValue((Mem*)pVal);
@ -463,7 +463,7 @@ static int sqlite3Step(Vdbe *p){
if( db->xProfile && !db->init.busy ){
double rNow;
sqlite3OsCurrentTime(db->pVfs, &rNow);
p->startTime = (rNow - (int)rNow)*3600.0*24.0*1000000000.0;
p->startTime = (u64)((rNow - (int)rNow)*3600.0*24.0*1000000000.0);
}
#endif
@ -494,7 +494,8 @@ static int sqlite3Step(Vdbe *p){
u64 elapseTime;
sqlite3OsCurrentTime(db->pVfs, &rNow);
elapseTime = (rNow - (int)rNow)*3600.0*24.0*1000000000.0 - p->startTime;
elapseTime = (u64)((rNow - (int)rNow)*3600.0*24.0*1000000000.0);
elapseTime -= p->startTime;
db->xProfile(db->pProfileArg, p->aOp[0].p4.z, elapseTime);
}
#endif
@ -1052,7 +1053,7 @@ static int bindText(
const void *zData, /* Pointer to the data to be bound */
int nData, /* Number of bytes of data to be bound */
void (*xDel)(void*), /* Destructor for the data */
int encoding /* Encoding for the data */
u8 encoding /* Encoding for the data */
){
Vdbe *p = (Vdbe *)pStmt;
Mem *pVar;

View File

@ -15,7 +15,7 @@
** only within the VDBE. Interface routines refer to a Mem using the
** name sqlite_value
**
** $Id: vdbemem.c,v 1.131 2008/12/10 11:49:06 drh Exp $
** $Id: vdbemem.c,v 1.132 2008/12/10 18:03:47 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -43,6 +43,8 @@
int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){
int rc;
assert( (pMem->flags&MEM_RowSet)==0 );
assert( desiredEnc==SQLITE_UTF8 || desiredEnc==SQLITE_UTF16LE
|| desiredEnc==SQLITE_UTF16BE );
if( !(pMem->flags&MEM_Str) || pMem->enc==desiredEnc ){
return SQLITE_OK;
}
@ -54,7 +56,7 @@ int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){
/* MemTranslate() may return SQLITE_OK or SQLITE_NOMEM. If NOMEM is returned,
** then the encoding of the value may not have changed.
*/
rc = sqlite3VdbeMemTranslate(pMem, desiredEnc);
rc = sqlite3VdbeMemTranslate(pMem, (u8)desiredEnc);
assert(rc==SQLITE_OK || rc==SQLITE_NOMEM);
assert(rc==SQLITE_OK || pMem->enc!=desiredEnc);
assert(rc==SQLITE_NOMEM || pMem->enc==desiredEnc);

View File

@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to help implement virtual tables.
**
** $Id: vtab.c,v 1.79 2008/12/10 17:20:01 drh Exp $
** $Id: vtab.c,v 1.80 2008/12/10 18:03:47 drh Exp $
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
#include "sqliteInt.h"
@ -27,7 +27,7 @@ static int createModule(
Module *pMod;
sqlite3_mutex_enter(db->mutex);
nName = strlen(zName);
nName = (int)strlen(zName);
pMod = (Module *)sqlite3DbMallocRaw(db, sizeof(Module) + nName + 1);
if( pMod ){
Module *pDel;
@ -193,7 +193,7 @@ void sqlite3VtabBeginParse(
addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName));
addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName));
addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
pParse->sNameToken.n = pModuleName->z + pModuleName->n - pName1->z;
pParse->sNameToken.n = (int)(&pModuleName->z[pModuleName->n] - pName1->z);
#ifndef SQLITE_OMIT_AUTHORIZATION
/* Creating a virtual table invokes the authorization callback twice.
@ -241,7 +241,7 @@ void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){
db = pParse->db;
if( pTab->nModuleArg<1 ) return;
zModule = pTab->azModuleArg[0];
pMod = (Module *)sqlite3HashFind(&db->aModule, zModule, strlen(zModule));
pMod = (Module*)sqlite3HashFind(&db->aModule, zModule, (int)strlen(zModule));
pTab->pMod = pMod;
/* If the CREATE VIRTUAL TABLE statement is being entered for the
@ -258,7 +258,7 @@ void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){
/* Compute the complete text of the CREATE VIRTUAL TABLE statement */
if( pEnd ){
pParse->sNameToken.n = pEnd->z - pParse->sNameToken.z + pEnd->n;
pParse->sNameToken.n = (int)(pEnd->z - pParse->sNameToken.z) + pEnd->n;
}
zStmt = sqlite3MPrintf(db, "CREATE VIRTUAL TABLE %T", &pParse->sNameToken);
@ -289,7 +289,7 @@ void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){
zWhere = sqlite3MPrintf(db, "name='%q'", pTab->zName);
sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 1, 0, zWhere, P4_DYNAMIC);
sqlite3VdbeAddOp4(v, OP_VCreate, iDb, 0, 0,
pTab->zName, strlen(pTab->zName) + 1);
pTab->zName, (int)strlen(pTab->zName) + 1);
}
/* If we are rereading the sqlite_master table create the in-memory
@ -300,7 +300,7 @@ void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){
Table *pOld;
Schema *pSchema = pTab->pSchema;
const char *zName = pTab->zName;
int nName = strlen(zName) + 1;
int nName = (int)strlen(zName) + 1;
pOld = sqlite3HashInsert(&pSchema->tblHash, zName, nName, pTab);
if( pOld ){
db->mallocFailed = 1;
@ -333,7 +333,7 @@ void sqlite3VtabArgExtend(Parse *pParse, Token *p){
pArg->n = p->n;
}else{
assert(pArg->z < p->z);
pArg->n = (p->z + p->n - pArg->z);
pArg->n = (int)(&p->z[p->n] - pArg->z);
}
}
@ -405,7 +405,7 @@ static int vtabCallConstructor(
int nType;
int i = 0;
if( !zType ) continue;
nType = strlen(zType);
nType = (int)strlen(zType);
if( sqlite3StrNICmp("hidden", zType, 6) || (zType[6] && zType[6]!=' ') ){
for(i=0; i<nType; i++){
if( (0==sqlite3StrNICmp(" hidden", &zType[i], 7))
@ -804,7 +804,7 @@ FuncDef *sqlite3VtabOverloadFunction(
/* Create a new ephemeral function definition for the overloaded
** function */
pNew = sqlite3DbMallocZero(db, sizeof(*pNew) + strlen(pDef->zName) );
pNew = sqlite3DbMallocZero(db, sizeof(*pNew) + (int)strlen(pDef->zName) );
if( pNew==0 ){
return pDef;
}

View File

@ -385,7 +385,7 @@ static int yy_find_shift_action(
if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
if( iLookAhead>0 ){
#ifdef YYFALLBACK
int iFallback; /* Fallback token */
YYCODETYPE iFallback; /* Fallback token */
if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
&& (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
@ -502,8 +502,8 @@ static void yy_shift(
}
#endif
yytos = &yypParser->yystack[yypParser->yyidx];
yytos->stateno = yyNewState;
yytos->major = yyMajor;
yytos->stateno = (YYACTIONTYPE)yyNewState;
yytos->major = (YYCODETYPE)yyMajor;
yytos->minor = *yypMinor;
#ifndef NDEBUG
if( yyTraceFILE && yypParser->yyidx>0 ){
@ -769,7 +769,7 @@ void Parse(
yyTracePrompt,yyTokenName[yymajor]);
}
#endif
yy_destructor(yypParser, yymajor,&yyminorunion);
yy_destructor(yypParser, (YYCODETYPE)yymajor,&yyminorunion);
yymajor = YYNOCODE;
}else{
while(
@ -782,7 +782,7 @@ void Parse(
yy_pop_parser_stack(yypParser);
}
if( yypParser->yyidx < 0 || yymajor==0 ){
yy_destructor(yypParser,yymajor,&yyminorunion);
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
yy_parse_failed(yypParser);
yymajor = YYNOCODE;
}else if( yymx!=YYERRORSYMBOL ){
@ -807,7 +807,7 @@ void Parse(
yy_syntax_error(yypParser,yymajor,yyminorunion);
}
yypParser->yyerrcnt = 3;
yy_destructor(yypParser,yymajor,&yyminorunion);
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
if( yyendofinput ){
yy_parse_failed(yypParser);
}