mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix warning messages in VC++. Patches from nicolas352001. (CVS 347)
FossilOrigin-Name: f3038d218c91b44b70b75a7b881ea24c87fa6a02
This commit is contained in:
22
manifest
22
manifest
@ -1,5 +1,5 @@
|
|||||||
C Version\s2.2.2\s(CVS\s451)
|
C Fix\swarning\smessages\sin\sVC++.\s\sPatches\sfrom\snicolas352001.\s(CVS\s347)
|
||||||
D 2002-01-14T03:00:00
|
D 2002-01-14T09:28:20
|
||||||
F Makefile.in 9fa4277413bf1d9cf91365f07d4108d7d87ed2af
|
F Makefile.in 9fa4277413bf1d9cf91365f07d4108d7d87ed2af
|
||||||
F Makefile.template c88ffcb9c339e718f434d0c7f045bcd7eea125af
|
F Makefile.template c88ffcb9c339e718f434d0c7f045bcd7eea125af
|
||||||
F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0
|
F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0
|
||||||
@ -24,14 +24,14 @@ F src/btree.h 9ead7f54c270d8a554e59352ca7318fdaf411390
|
|||||||
F src/build.c d44fbcfaf0eacd33a4686aa4dda8fc770b640421
|
F src/build.c d44fbcfaf0eacd33a4686aa4dda8fc770b640421
|
||||||
F src/delete.c f7690efc09ad6a2f1f3f0490e1b0cbb676bb95cf
|
F src/delete.c f7690efc09ad6a2f1f3f0490e1b0cbb676bb95cf
|
||||||
F src/expr.c 8169261ac56e96c860407a8773ca10b779e32328
|
F src/expr.c 8169261ac56e96c860407a8773ca10b779e32328
|
||||||
F src/hash.c 838a6f2af547dfdc5ff2b438e8f981ea4b74f224
|
F src/hash.c 8f7c740ef2eaaa8decfa8751f2be30680b123e46
|
||||||
F src/hash.h a5f5b3ce2d086a172c5879b0b06a27a82eac9fac
|
F src/hash.h a5f5b3ce2d086a172c5879b0b06a27a82eac9fac
|
||||||
F src/insert.c 813c37719866c583e6ca7660f94f10230f4e385d
|
F src/insert.c 813c37719866c583e6ca7660f94f10230f4e385d
|
||||||
F src/main.c bdce5ed20f2828cd5b390c3880d5820b70e09871
|
F src/main.c bdce5ed20f2828cd5b390c3880d5820b70e09871
|
||||||
F src/md5.c 52f677bfc590e09f71d07d7e327bd59da738d07c
|
F src/md5.c 52f677bfc590e09f71d07d7e327bd59da738d07c
|
||||||
F src/os.c 07882cde5c61f26751b8ee76fd84726c1f7e453c
|
F src/os.c dd91ef215566d9973eefcf6823c9e348c198ffb2
|
||||||
F src/os.h 00a18e0ae1139a64f1d3ead465ae2b9ff43f3db2
|
F src/os.h 5405a5695bf16889d4fc6caf9d42043caa41c269
|
||||||
F src/pager.c ad8a3574d88b3b2d9048206d00ebeaac5ef83fe5
|
F src/pager.c 1e80a3ba731e454df6bd2e58d32eeba7dd65121b
|
||||||
F src/pager.h f78d064c780855ff70beacbeba0e2324471b26fe
|
F src/pager.h f78d064c780855ff70beacbeba0e2324471b26fe
|
||||||
F src/parse.y f3fc4fb5766393003577bd175eb611495f6efd9f
|
F src/parse.y f3fc4fb5766393003577bd175eb611495f6efd9f
|
||||||
F src/printf.c 300a90554345751f26e1fc0c0333b90a66110a1d
|
F src/printf.c 300a90554345751f26e1fc0c0333b90a66110a1d
|
||||||
@ -48,8 +48,8 @@ F src/test2.c e9f99aa5ee73872819259d6612c11e55e1644321
|
|||||||
F src/test3.c d6775f95fd91f5b3cf0e2382a28e5aaeb68f745b
|
F src/test3.c d6775f95fd91f5b3cf0e2382a28e5aaeb68f745b
|
||||||
F src/tokenize.c 830e9ef684334070a26583d94770bb869e2727bf
|
F src/tokenize.c 830e9ef684334070a26583d94770bb869e2727bf
|
||||||
F src/update.c 5cb326ed4bace89cbad7d919b828da6c2a9064e4
|
F src/update.c 5cb326ed4bace89cbad7d919b828da6c2a9064e4
|
||||||
F src/util.c 8e9ca72d8288cae39c57c6f397abd14a56b14a38
|
F src/util.c 3958a14a2dbfb13fa5f779976b4d0daf9ab49bb1
|
||||||
F src/vdbe.c b27b256a5930da1e8fc347a272357be72de0f853
|
F src/vdbe.c 7c64ac039a603036ce08d4f1dda3856d2825d3b6
|
||||||
F src/vdbe.h e5cc6fb13d1905a4339db4d6dba4ab393c0765fa
|
F src/vdbe.h e5cc6fb13d1905a4339db4d6dba4ab393c0765fa
|
||||||
F src/where.c a9b286ac7323e7ebed5d3d217b3963acf1e6a355
|
F src/where.c a9b286ac7323e7ebed5d3d217b3963acf1e6a355
|
||||||
F test/all.test 2a51e5395ac7c2c539689b123b9782a05e3837fe
|
F test/all.test 2a51e5395ac7c2c539689b123b9782a05e3837fe
|
||||||
@ -119,7 +119,7 @@ F www/speed.tcl 83457b2bf6bb430900bd48ca3dd98264d9a916a5
|
|||||||
F www/sqlite.tcl 8b5884354cb615049aed83039f8dfe1552a44279
|
F www/sqlite.tcl 8b5884354cb615049aed83039f8dfe1552a44279
|
||||||
F www/tclsqlite.tcl 880ef67cb4f2797b95bf1368fc4e0d8ca0fda956
|
F www/tclsqlite.tcl 880ef67cb4f2797b95bf1368fc4e0d8ca0fda956
|
||||||
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
|
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
|
||||||
P 96cd07a881d7bea86a66d7dfe54713be9c81cb4c
|
P 7da00a33fece0b03b88c5103ce2b57e4d74ba2e4
|
||||||
R a1a9962b00d5c92a1a7c16dd24629b0d
|
R f896a2416d17f96354fea74d954d8046
|
||||||
U drh
|
U drh
|
||||||
Z 4dbf22ff719a9b7e3428eeb6319e1299
|
Z fb35b98556548e06aeb99c6405b80f40
|
||||||
|
@ -1 +1 @@
|
|||||||
7da00a33fece0b03b88c5103ce2b57e4d74ba2e4
|
f3038d218c91b44b70b75a7b881ea24c87fa6a02
|
18
src/hash.c
18
src/hash.c
@ -12,7 +12,7 @@
|
|||||||
** This is the implementation of generic hash-tables
|
** This is the implementation of generic hash-tables
|
||||||
** used in SQLite.
|
** used in SQLite.
|
||||||
**
|
**
|
||||||
** $Id: hash.c,v 1.5 2002/01/06 17:07:40 drh Exp $
|
** $Id: hash.c,v 1.6 2002/01/14 09:28:20 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -130,10 +130,10 @@ static int binCompare(const void *pKey1, int n1, const void *pKey2, int n2){
|
|||||||
*/
|
*/
|
||||||
static int (*hashFunction(int keyClass))(const void*,int){
|
static int (*hashFunction(int keyClass))(const void*,int){
|
||||||
switch( keyClass ){
|
switch( keyClass ){
|
||||||
case SQLITE_HASH_INT: return intHash;
|
case SQLITE_HASH_INT: return &intHash;
|
||||||
case SQLITE_HASH_POINTER: return ptrHash;
|
case SQLITE_HASH_POINTER: return &ptrHash;
|
||||||
case SQLITE_HASH_STRING: return strHash;
|
case SQLITE_HASH_STRING: return &strHash;
|
||||||
case SQLITE_HASH_BINARY: return binHash;;
|
case SQLITE_HASH_BINARY: return &binHash;;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -147,10 +147,10 @@ static int (*hashFunction(int keyClass))(const void*,int){
|
|||||||
*/
|
*/
|
||||||
static int (*compareFunction(int keyClass))(const void*,int,const void*,int){
|
static int (*compareFunction(int keyClass))(const void*,int,const void*,int){
|
||||||
switch( keyClass ){
|
switch( keyClass ){
|
||||||
case SQLITE_HASH_INT: return intCompare;
|
case SQLITE_HASH_INT: return &intCompare;
|
||||||
case SQLITE_HASH_POINTER: return ptrCompare;
|
case SQLITE_HASH_POINTER: return &ptrCompare;
|
||||||
case SQLITE_HASH_STRING: return strCompare;
|
case SQLITE_HASH_STRING: return &strCompare;
|
||||||
case SQLITE_HASH_BINARY: return binCompare;
|
case SQLITE_HASH_BINARY: return &binCompare;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
2
src/os.c
2
src/os.c
@ -499,7 +499,7 @@ int sqliteOsWrite(OsFile *id, const void *pBuf, int amt){
|
|||||||
#if OS_WIN
|
#if OS_WIN
|
||||||
DWORD wrote;
|
DWORD wrote;
|
||||||
SimulateIOError(SQLITE_IOERR);
|
SimulateIOError(SQLITE_IOERR);
|
||||||
if( !WriteFile(id->h, pBuf, amt, &wrote, 0) || wrote<amt ){
|
if( !WriteFile(id->h, pBuf, amt, &wrote, 0) || (int)wrote<amt ){
|
||||||
return SQLITE_FULL;
|
return SQLITE_FULL;
|
||||||
}
|
}
|
||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
|
8
src/os.h
8
src/os.h
@ -17,6 +17,14 @@
|
|||||||
#ifndef _SQLITE_OS_H_
|
#ifndef _SQLITE_OS_H_
|
||||||
#define _SQLITE_OS_H_
|
#define _SQLITE_OS_H_
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
# define OS_WIN 1
|
||||||
|
# undef OS_UNIX
|
||||||
|
#else
|
||||||
|
# define OS_UNIX 1
|
||||||
|
# undef OS_WIN
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** A handle for an open file is stored in an OsFile object.
|
** A handle for an open file is stored in an OsFile object.
|
||||||
*/
|
*/
|
||||||
|
10
src/pager.c
10
src/pager.c
@ -18,7 +18,7 @@
|
|||||||
** file simultaneously, or one process from reading the database while
|
** file simultaneously, or one process from reading the database while
|
||||||
** another is writing.
|
** another is writing.
|
||||||
**
|
**
|
||||||
** @(#) $Id: pager.c,v 1.35 2002/01/06 17:07:40 drh Exp $
|
** @(#) $Id: pager.c,v 1.36 2002/01/14 09:28:20 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "pager.h"
|
#include "pager.h"
|
||||||
@ -769,7 +769,7 @@ int sqlitepager_get(Pager *pPager, Pgno pgno, void **ppPage){
|
|||||||
pPager->nOvfl++;
|
pPager->nOvfl++;
|
||||||
}
|
}
|
||||||
pPg->pgno = pgno;
|
pPg->pgno = pgno;
|
||||||
if( pPager->aInJournal && pgno<=pPager->origDbSize ){
|
if( pPager->aInJournal && (int)pgno<=pPager->origDbSize ){
|
||||||
pPg->inJournal = (pPager->aInJournal[pgno/8] & (1<<(pgno&7)))!=0;
|
pPg->inJournal = (pPager->aInJournal[pgno/8] & (1<<(pgno&7)))!=0;
|
||||||
}else{
|
}else{
|
||||||
pPg->inJournal = 0;
|
pPg->inJournal = 0;
|
||||||
@ -786,7 +786,7 @@ int sqlitepager_get(Pager *pPager, Pgno pgno, void **ppPage){
|
|||||||
pPg->pNextHash->pPrevHash = pPg;
|
pPg->pNextHash->pPrevHash = pPg;
|
||||||
}
|
}
|
||||||
if( pPager->dbSize<0 ) sqlitepager_pagecount(pPager);
|
if( pPager->dbSize<0 ) sqlitepager_pagecount(pPager);
|
||||||
if( pPager->dbSize<pgno ){
|
if( pPager->dbSize<(int)pgno ){
|
||||||
memset(PGHDR_TO_DATA(pPg), 0, SQLITE_PAGE_SIZE);
|
memset(PGHDR_TO_DATA(pPg), 0, SQLITE_PAGE_SIZE);
|
||||||
}else{
|
}else{
|
||||||
int rc;
|
int rc;
|
||||||
@ -968,7 +968,7 @@ int sqlitepager_write(void *pData){
|
|||||||
/* The journal now exists and we have a write lock on the
|
/* The journal now exists and we have a write lock on the
|
||||||
** main database file. Write the current page to the journal.
|
** main database file. Write the current page to the journal.
|
||||||
*/
|
*/
|
||||||
if( pPg->pgno <= pPager->origDbSize ){
|
if( (int)pPg->pgno <= pPager->origDbSize ){
|
||||||
rc = sqliteOsWrite(&pPager->jfd, &pPg->pgno, sizeof(Pgno));
|
rc = sqliteOsWrite(&pPager->jfd, &pPg->pgno, sizeof(Pgno));
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
rc = sqliteOsWrite(&pPager->jfd, pData, SQLITE_PAGE_SIZE);
|
rc = sqliteOsWrite(&pPager->jfd, pData, SQLITE_PAGE_SIZE);
|
||||||
@ -986,7 +986,7 @@ int sqlitepager_write(void *pData){
|
|||||||
/* Mark the current page as being in the journal and return.
|
/* Mark the current page as being in the journal and return.
|
||||||
*/
|
*/
|
||||||
pPg->inJournal = 1;
|
pPg->inJournal = 1;
|
||||||
if( pPager->dbSize<pPg->pgno ){
|
if( pPager->dbSize<(int)pPg->pgno ){
|
||||||
pPager->dbSize = pPg->pgno;
|
pPager->dbSize = pPg->pgno;
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
** This file contains functions for allocating memory, comparing
|
** This file contains functions for allocating memory, comparing
|
||||||
** strings, and stuff like that.
|
** strings, and stuff like that.
|
||||||
**
|
**
|
||||||
** $Id: util.c,v 1.34 2001/12/22 14:49:25 drh Exp $
|
** $Id: util.c,v 1.35 2002/01/14 09:28:20 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@ -819,7 +819,7 @@ void sqliteRealToSortable(double r, char *z){
|
|||||||
while( r>0.0 && cnt<10 ){
|
while( r>0.0 && cnt<10 ){
|
||||||
int digit;
|
int digit;
|
||||||
r *= 64.0;
|
r *= 64.0;
|
||||||
digit = r;
|
digit = (int)r;
|
||||||
assert( digit>=0 && digit<64 );
|
assert( digit>=0 && digit<64 );
|
||||||
*z++ = zDigit[digit & 0x3f];
|
*z++ = zDigit[digit & 0x3f];
|
||||||
r -= digit;
|
r -= digit;
|
||||||
|
12
src/vdbe.c
12
src/vdbe.c
@ -30,7 +30,7 @@
|
|||||||
** But other routines are also provided to help in building up
|
** But other routines are also provided to help in building up
|
||||||
** a program instruction by instruction.
|
** a program instruction by instruction.
|
||||||
**
|
**
|
||||||
** $Id: vdbe.c,v 1.105 2002/01/06 17:07:41 drh Exp $
|
** $Id: vdbe.c,v 1.106 2002/01/14 09:28:20 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -586,7 +586,7 @@ static void hardRelease(Vdbe *p, int i){
|
|||||||
if(((P)->aStack[(I)].flags&STK_Int)==0){ hardIntegerify(P,I); }
|
if(((P)->aStack[(I)].flags&STK_Int)==0){ hardIntegerify(P,I); }
|
||||||
static void hardIntegerify(Vdbe *p, int i){
|
static void hardIntegerify(Vdbe *p, int i){
|
||||||
if( p->aStack[i].flags & STK_Real ){
|
if( p->aStack[i].flags & STK_Real ){
|
||||||
p->aStack[i].i = p->aStack[i].r;
|
p->aStack[i].i = (int)p->aStack[i].r;
|
||||||
Release(p, i);
|
Release(p, i);
|
||||||
}else if( p->aStack[i].flags & STK_Str ){
|
}else if( p->aStack[i].flags & STK_Str ){
|
||||||
p->aStack[i].i = atoi(p->zStack[i]);
|
p->aStack[i].i = atoi(p->zStack[i]);
|
||||||
@ -1511,8 +1511,8 @@ case OP_Remainder: {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
int ia = a;
|
int ia = (int)a;
|
||||||
int ib = b;
|
int ib = (int)b;
|
||||||
if( ia==0.0 ) goto divide_by_zero;
|
if( ia==0.0 ) goto divide_by_zero;
|
||||||
b = ib % ia;
|
b = ib % ia;
|
||||||
break;
|
break;
|
||||||
@ -3880,7 +3880,7 @@ case OP_AggIncr: {
|
|||||||
if( pMem->s.flags & STK_Int ){
|
if( pMem->s.flags & STK_Int ){
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
}else if( pMem->s.flags & STK_Real ){
|
}else if( pMem->s.flags & STK_Real ){
|
||||||
pMem->s.i = pMem->s.r;
|
pMem->s.i = (int)pMem->s.r;
|
||||||
}else if( pMem->s.flags & STK_Str ){
|
}else if( pMem->s.flags & STK_Str ){
|
||||||
pMem->s.i = atoi(pMem->z);
|
pMem->s.i = atoi(pMem->z);
|
||||||
}else{
|
}else{
|
||||||
@ -4282,9 +4282,11 @@ not_enough_stack:
|
|||||||
|
|
||||||
/* Jump here if an illegal or illformed instruction is executed.
|
/* Jump here if an illegal or illformed instruction is executed.
|
||||||
*/
|
*/
|
||||||
|
VERIFY(
|
||||||
bad_instruction:
|
bad_instruction:
|
||||||
sprintf(zBuf,"%d",pc);
|
sprintf(zBuf,"%d",pc);
|
||||||
sqliteSetString(pzErrMsg, "illegal operation at ", zBuf, 0);
|
sqliteSetString(pzErrMsg, "illegal operation at ", zBuf, 0);
|
||||||
rc = SQLITE_INTERNAL;
|
rc = SQLITE_INTERNAL;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user