Fix further warnings/compilation errors in test code. (CVS 5558)
FossilOrigin-Name: 42247b917ae5a5c0d81b934200810755d0040282
This commit is contained in:
parent
7b37c5d818
commit
44a376f6b4
20
manifest
20
manifest
@ -1,5 +1,5 @@
|
|||||||
C Documentation\supdates\sand\sclarifications\sin\ssqlite.h.in.\s(CVS\s5557)
|
C Fix\sfurther\swarnings/compilation\serrors\sin\stest\scode.\s(CVS\s5558)
|
||||||
D 2008-08-12T14:51:30
|
D 2008-08-12T15:04:59
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in 2713ea64947be3b35f35d9a3158bb8299c90b019
|
F Makefile.in 2713ea64947be3b35f35d9a3158bb8299c90b019
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@ -119,7 +119,7 @@ F src/main.c 9707706f62adc7a6830f7128eaaae6f3410046ae
|
|||||||
F src/malloc.c 22c68fc62f0c2df0f1deb8cd9a5ea968f995cac2
|
F src/malloc.c 22c68fc62f0c2df0f1deb8cd9a5ea968f995cac2
|
||||||
F src/md5.c 008216bbb5d34c6fbab5357aa68575ad8a31516a
|
F src/md5.c 008216bbb5d34c6fbab5357aa68575ad8a31516a
|
||||||
F src/mem1.c 3a7fe31d8290baa3bb203af72f7dfd6323966bcd
|
F src/mem1.c 3a7fe31d8290baa3bb203af72f7dfd6323966bcd
|
||||||
F src/mem2.c 87381b143530cc377592e868bd548e881c2498a3
|
F src/mem2.c 7256327b96927020824e06ffb3443b99a28da047
|
||||||
F src/mem3.c c73e935d0b900abc51d5fa45f880937b062f4a9f
|
F src/mem3.c c73e935d0b900abc51d5fa45f880937b062f4a9f
|
||||||
F src/mem4.c 6703adb1717b26d9d70a1c2586b4b7b7ffee7909
|
F src/mem4.c 6703adb1717b26d9d70a1c2586b4b7b7ffee7909
|
||||||
F src/mem5.c 0b0ba1c2a02d86eb812dea6debacee841e3856f7
|
F src/mem5.c 0b0ba1c2a02d86eb812dea6debacee841e3856f7
|
||||||
@ -151,11 +151,11 @@ F src/sqliteLimit.h f435e728c6b620ef7312814d660a81f9356eb5c8
|
|||||||
F src/status.c b39b4468fe97c7d26be2de052804887c099312e7
|
F src/status.c b39b4468fe97c7d26be2de052804887c099312e7
|
||||||
F src/table.c 22744786199c9195720c15a7a42cb97b2e2728d8
|
F src/table.c 22744786199c9195720c15a7a42cb97b2e2728d8
|
||||||
F src/tclsqlite.c ec46084184f033ba396a9ee7b5514b695083d0f3
|
F src/tclsqlite.c ec46084184f033ba396a9ee7b5514b695083d0f3
|
||||||
F src/test1.c e503344d492584d3df31c959f2b14da112e536f4
|
F src/test1.c 0ae2203b03dec8ecf8ad731038df47ba27bfe68c
|
||||||
F src/test2.c 7a634c1e044be3ea5845e65155fdd1cab13936cb
|
F src/test2.c 7a634c1e044be3ea5845e65155fdd1cab13936cb
|
||||||
F src/test3.c e00795839be38f0345a4845170426fb17d828bf9
|
F src/test3.c e00795839be38f0345a4845170426fb17d828bf9
|
||||||
F src/test4.c 41056378671e7b00e6305fa9ac6fa27e6f96f406
|
F src/test4.c 41056378671e7b00e6305fa9ac6fa27e6f96f406
|
||||||
F src/test5.c 847eb5cfe89c197b6b494858ccf60be981235bdf
|
F src/test5.c 162a1cea2105a2c460a3f39fa6919617b562a288
|
||||||
F src/test6.c 0a0304a69cfa4962a429d084c6d451ff9e4fb572
|
F src/test6.c 0a0304a69cfa4962a429d084c6d451ff9e4fb572
|
||||||
F src/test7.c 475b1fa7e3275408b40a3cbdc9508cbdc41ffa02
|
F src/test7.c 475b1fa7e3275408b40a3cbdc9508cbdc41ffa02
|
||||||
F src/test8.c 7da151778887275c7f62b972363c78a5609f2bd8
|
F src/test8.c 7da151778887275c7f62b972363c78a5609f2bd8
|
||||||
@ -180,7 +180,7 @@ F src/test_thread.c e297dd41db0b249646e69f97d36ec13e56e8b730
|
|||||||
F src/tokenize.c d16ca0e9944161c76d2e4c11dc379ec88189b93b
|
F src/tokenize.c d16ca0e9944161c76d2e4c11dc379ec88189b93b
|
||||||
F src/trigger.c b61aaf7bff8e3763b234dbf46a1a64fb88a34e64
|
F src/trigger.c b61aaf7bff8e3763b234dbf46a1a64fb88a34e64
|
||||||
F src/update.c 79b77a3cc8ed5f8903a7f37055fcedd69388dcae
|
F src/update.c 79b77a3cc8ed5f8903a7f37055fcedd69388dcae
|
||||||
F src/utf.c 036dd1a2ff8917b6a1417c4aa8fac4322cfd7611
|
F src/utf.c c63e6f69082f85c19ab88d62dedaf91d71ac1a50
|
||||||
F src/util.c afe659ccc05d1f8af9e8631dabfec3ee3a7144af
|
F src/util.c afe659ccc05d1f8af9e8631dabfec3ee3a7144af
|
||||||
F src/vacuum.c ef342828002debc97514617af3424aea8ef8522c
|
F src/vacuum.c ef342828002debc97514617af3424aea8ef8522c
|
||||||
F src/vdbe.c 2eff8c2206048f73e1ce23a56ed666b0591c56d5
|
F src/vdbe.c 2eff8c2206048f73e1ce23a56ed666b0591c56d5
|
||||||
@ -617,7 +617,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
|||||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||||
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
|
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
P 80c129e63ec7dbed3de1e485dffea96fae40aa6d
|
P e3935502fdca486613c8116b6057bfdd37545e58
|
||||||
R 25774e794e1ecb5577b8f86606a06257
|
R 81992e6503b50b00362c1f386109d2c1
|
||||||
U drh
|
U danielk1977
|
||||||
Z e8b0bbf8c483270e383fc49d3a494a77
|
Z 15fdebe7ba6a81553a61856d47818587
|
||||||
|
@ -1 +1 @@
|
|||||||
e3935502fdca486613c8116b6057bfdd37545e58
|
42247b917ae5a5c0d81b934200810755d0040282
|
@ -19,7 +19,7 @@
|
|||||||
** This file contains implementations of the low-level memory allocation
|
** This file contains implementations of the low-level memory allocation
|
||||||
** routines specified in the sqlite3_mem_methods object.
|
** routines specified in the sqlite3_mem_methods object.
|
||||||
**
|
**
|
||||||
** $Id: mem2.c,v 1.37 2008/07/25 08:49:00 danielk1977 Exp $
|
** $Id: mem2.c,v 1.38 2008/08/12 15:04:59 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
extern int backtrace(void**,int);
|
extern int backtrace(void**,int);
|
||||||
extern void backtrace_symbols_fd(void*const*,int,int);
|
extern void backtrace_symbols_fd(void*const*,int,int);
|
||||||
#else
|
#else
|
||||||
# define backtrace(A,B) 0
|
# define backtrace(A,B) 1
|
||||||
# define backtrace_symbols_fd(A,B,C)
|
# define backtrace_symbols_fd(A,B,C)
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
39
src/test1.c
39
src/test1.c
@ -13,7 +13,7 @@
|
|||||||
** is not included in the SQLite library. It is used for automated
|
** is not included in the SQLite library. It is used for automated
|
||||||
** testing of the SQLite library.
|
** testing of the SQLite library.
|
||||||
**
|
**
|
||||||
** $Id: test1.c,v 1.317 2008/07/31 02:05:04 shane Exp $
|
** $Id: test1.c,v 1.318 2008/08/12 15:04:59 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "tcl.h"
|
#include "tcl.h"
|
||||||
@ -3685,9 +3685,10 @@ static int test_stmt_utf8(
|
|||||||
){
|
){
|
||||||
sqlite3_stmt *pStmt;
|
sqlite3_stmt *pStmt;
|
||||||
int col;
|
int col;
|
||||||
const char *(*xFunc)(sqlite3_stmt*, int) = clientData;
|
const char *(*xFunc)(sqlite3_stmt*, int);
|
||||||
const char *zRet;
|
const char *zRet;
|
||||||
|
|
||||||
|
xFunc = (const char *(*)(sqlite3_stmt*, int))clientData;
|
||||||
if( objc!=3 ){
|
if( objc!=3 ){
|
||||||
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
||||||
Tcl_GetString(objv[0]), " STMT column", 0);
|
Tcl_GetString(objv[0]), " STMT column", 0);
|
||||||
@ -3739,8 +3740,9 @@ static int test_stmt_utf16(
|
|||||||
int col;
|
int col;
|
||||||
Tcl_Obj *pRet;
|
Tcl_Obj *pRet;
|
||||||
const void *zName16;
|
const void *zName16;
|
||||||
const void *(*xFunc)(sqlite3_stmt*, int) = clientData;
|
const void *(*xFunc)(sqlite3_stmt*, int);
|
||||||
|
|
||||||
|
xFunc = (const void *(*)(sqlite3_stmt*, int))clientData;
|
||||||
if( objc!=3 ){
|
if( objc!=3 ){
|
||||||
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
||||||
Tcl_GetString(objv[0]), " STMT column", 0);
|
Tcl_GetString(objv[0]), " STMT column", 0);
|
||||||
@ -3776,8 +3778,9 @@ static int test_stmt_int(
|
|||||||
){
|
){
|
||||||
sqlite3_stmt *pStmt;
|
sqlite3_stmt *pStmt;
|
||||||
int col;
|
int col;
|
||||||
int (*xFunc)(sqlite3_stmt*, int) = clientData;
|
int (*xFunc)(sqlite3_stmt*, int);
|
||||||
|
|
||||||
|
xFunc = (const void *(*)(sqlite3_stmt*, int))clientData;
|
||||||
if( objc!=3 ){
|
if( objc!=3 ){
|
||||||
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
||||||
Tcl_GetString(objv[0]), " STMT column", 0);
|
Tcl_GetString(objv[0]), " STMT column", 0);
|
||||||
@ -4615,32 +4618,32 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
|
|||||||
{ "sqlite3_column_blob", test_column_blob ,0 },
|
{ "sqlite3_column_blob", test_column_blob ,0 },
|
||||||
{ "sqlite3_column_double", test_column_double ,0 },
|
{ "sqlite3_column_double", test_column_double ,0 },
|
||||||
{ "sqlite3_column_int64", test_column_int64 ,0 },
|
{ "sqlite3_column_int64", test_column_int64 ,0 },
|
||||||
{ "sqlite3_column_text", test_stmt_utf8, sqlite3_column_text },
|
{ "sqlite3_column_text", test_stmt_utf8, (void*)sqlite3_column_text },
|
||||||
{ "sqlite3_column_name", test_stmt_utf8, sqlite3_column_name },
|
{ "sqlite3_column_name", test_stmt_utf8, (void*)sqlite3_column_name },
|
||||||
{ "sqlite3_column_int", test_stmt_int, sqlite3_column_int },
|
{ "sqlite3_column_int", test_stmt_int, (void*)sqlite3_column_int },
|
||||||
{ "sqlite3_column_bytes", test_stmt_int, sqlite3_column_bytes },
|
{ "sqlite3_column_bytes", test_stmt_int, (void*)sqlite3_column_bytes},
|
||||||
#ifndef SQLITE_OMIT_DECLTYPE
|
#ifndef SQLITE_OMIT_DECLTYPE
|
||||||
{ "sqlite3_column_decltype", test_stmt_utf8, sqlite3_column_decltype },
|
{ "sqlite3_column_decltype",test_stmt_utf8,(void*)sqlite3_column_decltype},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SQLITE_ENABLE_COLUMN_METADATA
|
#ifdef SQLITE_ENABLE_COLUMN_METADATA
|
||||||
{ "sqlite3_column_database_name", test_stmt_utf8, sqlite3_column_database_name},
|
{ "sqlite3_column_database_name",test_stmt_utf8,(void*)sqlite3_column_database_name},
|
||||||
{ "sqlite3_column_table_name", test_stmt_utf8, sqlite3_column_table_name},
|
{ "sqlite3_column_table_name",test_stmt_utf8,(void*)sqlite3_column_table_name},
|
||||||
{ "sqlite3_column_origin_name", test_stmt_utf8, sqlite3_column_origin_name},
|
{ "sqlite3_column_origin_name",test_stmt_utf8,(void*)sqlite3_column_origin_name},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SQLITE_OMIT_UTF16
|
#ifndef SQLITE_OMIT_UTF16
|
||||||
{ "sqlite3_column_bytes16", test_stmt_int, sqlite3_column_bytes16 },
|
{ "sqlite3_column_bytes16", test_stmt_int, (void*)sqlite3_column_bytes16 },
|
||||||
{ "sqlite3_column_text16", test_stmt_utf16, sqlite3_column_text16 },
|
{ "sqlite3_column_text16", test_stmt_utf16, (void*)sqlite3_column_text16},
|
||||||
{ "sqlite3_column_name16", test_stmt_utf16, sqlite3_column_name16 },
|
{ "sqlite3_column_name16", test_stmt_utf16, (void*)sqlite3_column_name16},
|
||||||
{ "add_alignment_test_collations", add_alignment_test_collations, 0 },
|
{ "add_alignment_test_collations", add_alignment_test_collations, 0 },
|
||||||
#ifndef SQLITE_OMIT_DECLTYPE
|
#ifndef SQLITE_OMIT_DECLTYPE
|
||||||
{ "sqlite3_column_decltype16", test_stmt_utf16, sqlite3_column_decltype16},
|
{ "sqlite3_column_decltype16",test_stmt_utf16,(void*)sqlite3_column_decltype16},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SQLITE_ENABLE_COLUMN_METADATA
|
#ifdef SQLITE_ENABLE_COLUMN_METADATA
|
||||||
{"sqlite3_column_database_name16",
|
{"sqlite3_column_database_name16",
|
||||||
test_stmt_utf16, sqlite3_column_database_name16},
|
test_stmt_utf16, sqlite3_column_database_name16},
|
||||||
{"sqlite3_column_table_name16", test_stmt_utf16, sqlite3_column_table_name16},
|
{"sqlite3_column_table_name16", test_stmt_utf16, (void*)sqlite3_column_table_name16},
|
||||||
{"sqlite3_column_origin_name16", test_stmt_utf16, sqlite3_column_origin_name16},
|
{"sqlite3_column_origin_name16", test_stmt_utf16, (void*)sqlite3_column_origin_name16},
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
{ "sqlite3_create_collation_v2", test_create_collation_v2, 0 },
|
{ "sqlite3_create_collation_v2", test_create_collation_v2, 0 },
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
** is used for testing the SQLite routines for converting between
|
** is used for testing the SQLite routines for converting between
|
||||||
** the various supported unicode encodings.
|
** the various supported unicode encodings.
|
||||||
**
|
**
|
||||||
** $Id: test5.c,v 1.21 2008/07/28 19:34:54 drh Exp $
|
** $Id: test5.c,v 1.22 2008/08/12 15:04:59 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "vdbeInt.h"
|
#include "vdbeInt.h"
|
||||||
@ -99,7 +99,7 @@ static u8 name_to_enc(Tcl_Interp *interp, Tcl_Obj *pObj){
|
|||||||
{ "UTF8", SQLITE_UTF8 },
|
{ "UTF8", SQLITE_UTF8 },
|
||||||
{ "UTF16LE", SQLITE_UTF16LE },
|
{ "UTF16LE", SQLITE_UTF16LE },
|
||||||
{ "UTF16BE", SQLITE_UTF16BE },
|
{ "UTF16BE", SQLITE_UTF16BE },
|
||||||
{ "UTF16", SQLITE_UTF16NATIVE },
|
{ "UTF16", SQLITE_UTF16 },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
struct EncName *pEnc;
|
struct EncName *pEnc;
|
||||||
@ -112,6 +112,9 @@ static u8 name_to_enc(Tcl_Interp *interp, Tcl_Obj *pObj){
|
|||||||
if( !pEnc->enc ){
|
if( !pEnc->enc ){
|
||||||
Tcl_AppendResult(interp, "No such encoding: ", z, 0);
|
Tcl_AppendResult(interp, "No such encoding: ", z, 0);
|
||||||
}
|
}
|
||||||
|
if( pEnc->enc==SQLITE_UTF16 ){
|
||||||
|
return SQLITE_UTF16NATIVE;
|
||||||
|
}
|
||||||
return pEnc->enc;
|
return pEnc->enc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +185,7 @@ static int test_translate(
|
|||||||
** Call sqlite3UtfSelfTest() to run the internal tests for unicode
|
** Call sqlite3UtfSelfTest() to run the internal tests for unicode
|
||||||
** translation. If there is a problem an assert() will fail.
|
** translation. If there is a problem an assert() will fail.
|
||||||
**/
|
**/
|
||||||
void sqlite3UtfSelfTest();
|
void sqlite3UtfSelfTest(void);
|
||||||
static int test_translate_selftest(
|
static int test_translate_selftest(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
** This file contains routines used to translate between UTF-8,
|
** This file contains routines used to translate between UTF-8,
|
||||||
** UTF-16, UTF-16BE, and UTF-16LE.
|
** UTF-16, UTF-16BE, and UTF-16LE.
|
||||||
**
|
**
|
||||||
** $Id: utf.c,v 1.64 2008/08/12 14:48:41 danielk1977 Exp $
|
** $Id: utf.c,v 1.65 2008/08/12 15:04:59 danielk1977 Exp $
|
||||||
**
|
**
|
||||||
** Notes on UTF-8:
|
** Notes on UTF-8:
|
||||||
**
|
**
|
||||||
@ -481,7 +481,7 @@ int sqlite3Utf16ByteLen(const void *zIn, int nChar){
|
|||||||
** It checks that the primitives for serializing and deserializing
|
** It checks that the primitives for serializing and deserializing
|
||||||
** characters in each encoding are inverses of each other.
|
** characters in each encoding are inverses of each other.
|
||||||
*/
|
*/
|
||||||
void sqlite3UtfSelfTest(){
|
void sqlite3UtfSelfTest(void){
|
||||||
unsigned int i, t;
|
unsigned int i, t;
|
||||||
unsigned char zBuf[20];
|
unsigned char zBuf[20];
|
||||||
unsigned char *z;
|
unsigned char *z;
|
||||||
|
Loading…
Reference in New Issue
Block a user