Work to remove harmless MSVC compiler warnings. (CVS 6013)

FossilOrigin-Name: 715dcd52c1372c62873cff5db97fdbdfce617808
This commit is contained in:
shane 2008-12-10 22:30:24 +00:00
parent 0e4deca3e1
commit 18e526c16b
7 changed files with 48 additions and 24 deletions

View File

@ -1,5 +1,5 @@
C The\sstrlen30\sfunction\sin\stclsqlite.c\sshould\sbe\sdefined\sregardless\sof\swhether\nor\snot\sthe\samalgamation\sis\sused.\s(CVS\s6012)
D 2008-12-10T22:18:40
C Work\sto\sremove\sharmless\sMSVC\scompiler\swarnings.\s(CVS\s6013)
D 2008-12-10T22:30:25
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in f7e4c81c347b04f7b0f1c1b081a168645d7b8af7
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -103,10 +103,10 @@ F src/btmutex.c 63c5cc4ad5715690767ffcb741e185d7bc35ec1a
F src/btree.c e5bfe007a4c4f643cb69426e6af0a9e556352f5b
F src/btree.h 179c3ea813780df78a289a8f5130db18e6d4616e
F src/btreeInt.h 7ef2c872371d7508657f8d7a4efe651c741d6ee6
F src/build.c 205538f36cd5c9ec04f24beecdb69629758aaa50
F src/build.c ae4359475f82acbd947db6d957e2ff39d66de26e
F src/callback.c bee8949d619b1b7b1e4dfac8a19c5116ae1dd12a
F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c
F src/date.c 719afa5531c5350f2929d36122a7e0355c0f3d70
F src/date.c 3dbac3eac2848af416786b6e1e3150f7c740dac6
F src/delete.c e2392b6808496fc0a7f54662af3ba677a3e8e44a
F src/expr.c f13ad5563470481eaa1e8016bfa9ed1b4c996574
F src/fault.c dc88c821842157460750d2d61a8a8b4197d047ff
@ -138,7 +138,7 @@ F src/os.h 4ee25a35c00e75a569cecb5080be299b0c3e208e
F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c 970e4a98a2d026cbeb2464694e4d13e079102b2f
F src/os_win.c d7a12403025a69a358974ba7504562b109fd403b
F src/os_win.c d42d591be8669de0ecf3a0433108d31a8eadcbb3
F src/pager.c 7e8c2b7b7131031cfa88ab0fdbb2de047f5be934
F src/pager.h 37f5173612b7803f44656c16e80df3280234bb18
F src/parse.y 3dfd941533cdc6ce0b09b905b25c4eb73858400b
@ -152,7 +152,7 @@ F src/random.c 676b9d7ac820fe81e6fb2394ac8c10cff7f38628
F src/resolve.c 18dc9f0df1d60048e012ce6632251063e0dd356a
F src/rowset.c 2256fa4a928f750e2f3d6fc733523034beceb1d6
F src/select.c a4316c5e8a417687e159b3d3ae689363d1dec5df
F src/shell.c 4b9c41beb71733c4ed04f3c7b3abd8baa6701da6
F src/shell.c 255762876786ed3a915b45e789652371e2bbeac5
F src/sqlite.h.in 619a82b485fbf02276ecb8b1cc629f0c8bcda4ca
F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
F src/sqliteInt.h a1478d1ec40bca0b511c06e2b4c93dc932aa3426
@ -191,7 +191,7 @@ F src/test_wsd.c c297d7d6b8a990239e1bd25935e81d612d8ae31d
F src/tokenize.c aaa5fa6a4536a9dd7c855a3f66f32508f1612138
F src/trigger.c 5a669d8fc9197db393ff85fa95ec882282162bb5
F src/update.c 080889d241e4dcd1c545c8051eb6de86f4939295
F src/utf.c 7bc90bc7d1a0239f876e2c2ce573e9b103aedcd4
F src/utf.c 1da9c832dba0fa8f865b5b902d93f420a1ee4245
F src/util.c ea62608f66f33a7e8322de83024ae37c415c0c7f
F src/vacuum.c 383d6297bddc011ab04a9eed110db6eaf523e8e9
F src/vdbe.c 0244413f3dae1ee63479f541ec2e950b05c65112
@ -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 258722b6178f60eaccef1675aab3edc456d413a5
R 9eceeaf01a9789d4fefaac049c754f93
U drh
Z fb591fbf9381ed65d6920b1670846bff
P d8e8c7e51c09dc4e4d7e45ba1866c78713d6f5aa
R f959e1ab5401e7d3004781a04b796347
U shane
Z d6277d4543089778fd38b8ffedf3e203

View File

@ -1 +1 @@
d8e8c7e51c09dc4e4d7e45ba1866c78713d6f5aa
715dcd52c1372c62873cff5db97fdbdfce617808

View File

@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.507 2008/12/10 21:19:57 drh Exp $
** $Id: build.c,v 1.508 2008/12/10 22:30:25 shane Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -3056,7 +3056,7 @@ SrcList *sqlite3SrcListEnlarge(
for(i=pSrc->nSrc-1; i>=iStart; i--){
pSrc->a[i+nExtra] = pSrc->a[i];
}
pSrc->nSrc += (u16)nExtra;
pSrc->nSrc += (i16)nExtra;
/* Zero the newly allocated slots */
memset(&pSrc->a[iStart], 0, sizeof(pSrc->a[0])*nExtra);

View File

@ -16,7 +16,7 @@
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.97 2008/12/10 21:19:57 drh Exp $
** $Id: date.c,v 1.98 2008/12/10 22:30:25 shane Exp $
**
** SQLite processes all times and dates as Julian Day numbers. The
** dates and times are stored as the number of days since noon
@ -550,7 +550,7 @@ static int parseModifier(const char *zMod, DateTime *p){
** seconds since 1970. Convert to a real julian day number.
*/
if( strcmp(z, "unixepoch")==0 && p->validJD ){
p->iJD = p->iJD*10/864000 + 210866760000000LL;
p->iJD = p->iJD/86400 + 210866760000000LL;
clearYMD_HMS_TZ(p);
rc = 0;
}

View File

@ -12,7 +12,7 @@
**
** This file contains code that is specific to windows.
**
** $Id: os_win.c,v 1.143 2008/12/10 21:19:57 drh Exp $
** $Id: os_win.c,v 1.144 2008/12/10 22:30:25 shane Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_WIN /* This file is used for windows only */
@ -743,7 +743,11 @@ int sqlite3_fullsync_count = 0;
** Make sure all writes to a particular file are committed to disk.
*/
static int winSync(sqlite3_file *id, int flags){
#ifndef SQLITE_NO_SYNC
winFile *pFile = (winFile*)id;
#else
UNUSED_PARAMETER(id);
#endif
OSTRACE3("SYNC %d lock=%d\n", pFile->h, pFile->locktype);
#ifdef SQLITE_TEST
if( flags & SQLITE_SYNC_FULL ){
@ -1050,6 +1054,7 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
** same for both.
*/
static int winSectorSize(sqlite3_file *id){
UNUSED_PARAMETER(id);
return SQLITE_DEFAULT_SECTOR_SIZE;
}
@ -1057,6 +1062,7 @@ static int winSectorSize(sqlite3_file *id){
** Return a vector of device characteristics.
*/
static int winDeviceCharacteristics(sqlite3_file *id){
UNUSED_PARAMETER(id);
return 0;
}
@ -1217,6 +1223,8 @@ static int winOpen(
const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */
char zTmpname[MAX_PATH+1]; /* Buffer used to create temp filename */
UNUSED_PARAMETER(pVfs);
/* If the second argument to this function is NULL, generate a
** temporary file name to use
*/
@ -1352,6 +1360,8 @@ static int winDelete(
DWORD rc;
DWORD error = 0;
void *zConverted = convertUtf8Filename(zFilename);
UNUSED_PARAMETER(pVfs);
UNUSED_PARAMETER(syncDir);
if( zConverted==0 ){
return SQLITE_NOMEM;
}
@ -1395,6 +1405,7 @@ static int winAccess(
DWORD attr;
int rc = 0;
void *zConverted = convertUtf8Filename(zFilename);
UNUSED_PARAMETER(pVfs);
if( zConverted==0 ){
return SQLITE_NOMEM;
}
@ -1439,11 +1450,13 @@ static int winFullPathname(
){
#if defined(__CYGWIN__)
UNUSED_PARAMETER(nFull);
cygwin_conv_to_full_win32_path(zRelative, zFull);
return SQLITE_OK;
#endif
#if SQLITE_OS_WINCE
UNUSED_PARAMETER(nFull);
/* WinCE has no concept of a relative pathname, or so I am told. */
sqlite3_snprintf(pVfs->mxPathname, zFull, "%s", zRelative);
return SQLITE_OK;
@ -1453,6 +1466,7 @@ static int winFullPathname(
int nByte;
void *zConverted;
char *zOut;
UNUSED_PARAMETER(nFull);
zConverted = convertUtf8Filename(zRelative);
if( isNT() ){
WCHAR *zTemp;

View File

@ -12,8 +12,13 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.193 2008/12/10 22:15:00 drh Exp $
** $Id: shell.c,v 1.194 2008/12/10 22:30:25 shane Exp $
*/
#if defined(_WIN32) || defined(WIN32)
/* This needs to come before any includes for MSVC compiler */
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@ -48,6 +53,8 @@
#if defined(_WIN32) || defined(WIN32)
# include <io.h>
#define isatty(h) _isatty(h)
#define access(f,m) _access((f),(m))
#else
/* Make sure isatty() has a prototype.
*/

View File

@ -12,7 +12,7 @@
** This file contains routines used to translate between UTF-8,
** UTF-16, UTF-16BE, and UTF-16LE.
**
** $Id: utf.c,v 1.69 2008/12/10 19:26:24 drh Exp $
** $Id: utf.c,v 1.70 2008/12/10 22:30:25 shane Exp $
**
** Notes on UTF-8:
**
@ -51,7 +51,7 @@ const int sqlite3one = 1;
** This lookup table is used to help decode the first byte of
** a multi-byte UTF8 character.
*/
static const unsigned char sqlite3UtfTrans1[] = {
static const unsigned char sqlite3Utf8Trans1[] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@ -159,7 +159,7 @@ static const unsigned char sqlite3UtfTrans1[] = {
#define READ_UTF8(zIn, zTerm, c) \
c = *(zIn++); \
if( c>=0xc0 ){ \
c = sqlite3UtfTrans1[c-0xc0]; \
c = sqlite3Utf8Trans1[c-0xc0]; \
while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){ \
c = (c<<6) + (0x3f & *(zIn++)); \
} \
@ -495,7 +495,8 @@ void sqlite3UtfSelfTest(void){
for(i=0; i<0x00110000; i++){
z = zBuf;
WRITE_UTF8(z, i);
n = z-zBuf;
n = (int)(z-zBuf);
assert( n>0 && n<=4 );
z[0] = 0;
zTerm = z;
z = zBuf;
@ -510,7 +511,8 @@ void sqlite3UtfSelfTest(void){
if( i>=0xD800 && i<0xE000 ) continue;
z = zBuf;
WRITE_UTF16LE(z, i);
n = z-zBuf;
n = (int)(z-zBuf);
assert( n>0 && n<=4 );
z[0] = 0;
z = zBuf;
READ_UTF16LE(z, c);
@ -521,7 +523,8 @@ void sqlite3UtfSelfTest(void){
if( i>=0xD800 && i<0xE000 ) continue;
z = zBuf;
WRITE_UTF16BE(z, i);
n = z-zBuf;
n = (int)(z-zBuf);
assert( n>0 && n<=4 );
z[0] = 0;
z = zBuf;
READ_UTF16BE(z, c);