1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

Silence(!) Win64 build warnings

This commit is contained in:
Max Maischein 2009-04-18 16:08:41 +00:00
parent 1087a50857
commit 14b507835b
6 changed files with 1273 additions and 1397 deletions

4
.gitignore vendored
View file

@ -1,6 +1,10 @@
*.o
*.bs
blib/
*.def
dll.base
dll.def
dll.exp
SQLite.c
*.xsi
pm_to_blib

420
dbdimp.c

File diff suppressed because it is too large Load diff

10
fts3.c
View file

@ -1719,7 +1719,7 @@ static char *string_dup_n(const char *s, int n){
* (We don't use strdup() since it is not part of the standard C library and
* may not be available everywhere.) */
static char *string_dup(const char *s){
return string_dup_n(s, strlen(s));
return string_dup_n(s, (int)strlen(s));
}
/* Format a string, replacing each occurrence of the % character with
@ -1742,7 +1742,7 @@ static char *string_format(const char *zFormat,
}
len += 1; /* for null terminator */
r = result = sqlite3_malloc(len);
r = result = sqlite3_malloc((int)len);
for(p = zFormat; *p; ++p){
if( *p=='%' ){
memcpy(r, zDb, nDb);
@ -2565,7 +2565,7 @@ typedef struct FtsToken {
*/
static char **tokenizeString(const char *z, int *pnToken){
int nToken = 0;
FtsToken *aToken = sqlite3_malloc( strlen(z) * sizeof(aToken[0]) );
FtsToken *aToken = sqlite3_malloc( (int)( strlen(z) * sizeof(aToken[0]) ) );
int n = 1;
int e, i;
int totalSize = 0;
@ -2765,7 +2765,7 @@ static int parseSpec(TableSpec *pSpec, int argc, const char *const*argv,
*/
CLEAR(pSpec);
for(i=n=0; i<argc; i++){
n += strlen(argv[i]) + 1;
n += (int)( strlen(argv[i]) + 1 );
}
azArg = sqlite3_malloc( sizeof(char*)*argc + n );
if( azArg==0 ){
@ -2905,7 +2905,7 @@ static int constructVtab(
if( !zTok ){
zTok = "simple";
}
nTok = strlen(zTok)+1;
nTok = (int)( strlen(zTok)+1 );
m = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zTok, nTok);
if( !m ){

View file

@ -358,7 +358,7 @@ static int getNextNode(
pRet->eType = pKey->eType;
pRet->nNear = nNear;
*ppExpr = pRet;
*pnConsumed = (zInput - z) + nKey;
*pnConsumed = (int)( (zInput - z) + nKey );
return SQLITE_OK;
}
@ -378,14 +378,14 @@ static int getNextNode(
if( rc==SQLITE_OK && !*ppExpr ){
rc = SQLITE_DONE;
}
*pnConsumed = (zInput - z) + 1 + nConsumed;
*pnConsumed = (int)( (zInput - z) + 1 + nConsumed );
return rc;
}
/* Check for a close bracket. */
if( *zInput==')' ){
pParse->nNest--;
*pnConsumed = (zInput - z) + 1;
*pnConsumed = (int)( (zInput - z) + 1 );
return SQLITE_DONE;
}
}
@ -397,7 +397,7 @@ static int getNextNode(
*/
if( *zInput=='"' ){
for(ii=1; ii<nInput && zInput[ii]!='"'; ii++);
*pnConsumed = (zInput - z) + ii + 1;
*pnConsumed = (int)( (zInput - z) + ii + 1 );
if( ii==nInput ){
return SQLITE_ERROR;
}
@ -685,7 +685,7 @@ int sqlite3Fts3ExprParse(
return SQLITE_OK;
}
if( n<0 ){
n = strlen(z);
n = (int)strlen(z);
}
rc = fts3ExprParse(&sParse, z, n, ppExpr, &nParsed);

View file

@ -547,7 +547,7 @@ static void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
/* z[] is now the stemmed word in reverse order. Flip it back
** around into forward order and return.
*/
*pnOut = i = strlen(z);
*pnOut = i = (int)strlen(z);
zOut[i] = 0;
while( *z ){
zOut[--i] = *(z++);

View file

@ -75,7 +75,7 @@ static int simpleCreate(
** information on the initial create.
*/
if( argc>1 ){
int i, n = strlen(argv[1]);
int i, n = (int)strlen(argv[1]);
for(i=0; i<n; i++){
unsigned char ch = argv[1][i];
/* We explicitly don't support UTF-8 delimiters for now. */